What is Filter? List the applications of filter
What is filter?
-
A filter is an object that is invoked at the preprocessing andpost processingof a request.Java Servlet Filter is used to intercept request and do some pre-processing and can be used to intercept response and do post-processing before sending to client in web application
Advantages Of Filter
- Authentication-Blocking requests based on user identity.
- Logging and auditing-Tracking users of a web application
- Image conversion-Scaling maps, and so on
- Data compression-Making downloads smaller
- Localization-Targeting the request and response to aparticular locale