On the way from a stand alone servlet to a client there can be some filters. Filters can alter the response of the actual servlet to the client based on the policies or conditions of the servlet or client.The Essentials of FiltersFilters can perform many different types of functions.
- 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 a particular locale.
- XSL/T transformations of XML content-Targeting web application responses to more that one type of client.
These are just a few of the
applications of filters. There are many more, such as encryption,
tokenizing, triggering resource access events, mime-type chaining, and