What are filter class in java?- The filter class in java can manipulate request before reaches to the web server. - It can also manipulate response before it reaches the client browser.
Some of the different types of filters that are suggested by their specifications are:
1. Authentication Filters. 2. Data compression Filters 3. Encryption Filters . 4. Filters that trigger resource access events. 5. Image Conversion Filters . 6. Logging and Auditing Filters. 7. MIME-TYPE Chain Filters. 8. Tokenizing Filters . 9. XSL/T Filters That Transform XML Content.
- These filters are deployed in the deployment descriptor file that is web.xml file and then it maps to either Servlet or JSP or URL patterns in your application's deployment descriptor. - This deployment descriptor file web.xml is found in the \conf directory. - An instance of each filter is created that is declared in the deployment descriptor when the JSP container starts the web application. - The execution of the filters takes place in the order of their declaration in the deployment descriptor.
|