CHAPTER 10 INTRODUCTION TO FILTERING 423 ProJSP Example Filters Simple Filter com.apress.projsp.filters.SimpleFilter Simple Filter /* Note If you re working with the source-code distribution downloaded from the book s website, these filter definitions and mappings are included but commented out. You should uncomment each set as appropriate as you progress through the example. All that s left to do now is to create a resource to access. Listing 10-3 shows a simple JSP page. Because we re more interested in the filter processing than the JSP processing, this JSP page does no processing; it is just a convenient resource we can access to demonstrate filter processing. Listing 10-3. index.jsp
Welcome to Filtering Demo Application!
Testing the Filter You re now ready to test the filter. Assuming that Tomcat isn t currently running, perform the following steps: 1. Go to Tomcat s logs subdirectory and delete all files. 2. Create a web application with the filter and index.jsp and deploy it. 3. Start Tomcat 5. 4. Start a browser and navigate to http://localhost:8080/filters1/index.jsp. 5. After the web page has loaded in the browser, shut down Tomcat.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.
This entry was posted
on Thursday, February 7th, 2008 at 4:53 pm and is filed under Jsp.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.