Advanced Java (2160707)

BE | Semester-4   Winter-2018 | 20-11-2018

Q5) (a)

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

  1. Authentication-Blocking requests based on user identity.
  2. Logging and auditing-Tracking users of a web application
  3. Image conversion-Scaling maps, and so on
  4. Data compression-Making downloads smaller
  5. Localization-Targeting the request and response to aparticular locale