CHAPTER 10 INTRODUCTION TO FILTERING (Web hosting faq) 419 Finally,

CHAPTER 10 INTRODUCTION TO FILTERING 419 Finally, an incoming request for http://tomcathost/myapp/servlet/mylocate will have the following filters applied in order: Audit Filter Authentication Filter Visual Audit Filter Initial Parameters for Filters You can specify as a child element of to provide initial parameters for the filter instance, as in the following snippet. This web.xml file segment controls the hours that the Stop Games Filter may operate (this filter blocks game playing): Stop Games Filter filters.StopGamesFilter
starthour 10

stophour 11
The container will associate the textual name Stop Games Filterwith the StopGamesFilter filter class. The parameters are accessed within the filter and instruct the filter to restrict gaming activities between 10 and 11 a.m. by default. The starthour and stophour will be accessible within the filter via a call to the FilterConfigobject: String startHour = filterConfig.getInitParameter(”starthour”); String stopHour = filterConfig.getInitParameter(”stophour”); Initialization for Multiple Instances of Same Filter Note that a container will create an instance of a filter for each definition encountered within the application. You can therefore define two instances of the same filter within the same web application each with different initialization parameters. Of course, the two instances should have different textual names. For example, you may want to set up an instance of a StopGamesFilter to block access from 8 a.m. to 10 p.m. for the Administration department, and another instance to block access from 8 a.m. to 9 a.m. for the Engineering department, (because if you don t block access, the engineers will play games right through breakfast): Stop Games Filter For Administration Department
We recommend high quality webhost to host and run your jsp application: christian web host services.

Leave a Reply