Using the templates in this category you can create:
filters.
The most significant part of API 2.3 is the addition of filters - objects that can transform a request or modify a response.
Filters are not servlets; they do not actually create a response. They are preprocessors of the request before it reaches a servlet, and/or postprocessors of the response leaving a servlet.
In a sense, filters are a mature version of the old "servlet chaining" concept. A filter can:
- Intercept a servlet's invocation before the servlet is called
- Examine a request before a servlet is called
- Modify the request headers and request data by providing a customized version of the request object that wraps the real request
- Modify the response headers and response data by providing a customized version of the response object that wraps the real response
- Intercept a servlet's invocation after the servlet is called
You can configure a filter to act on a servlet or group of servlets; that servlet or group can be filtered by zero or more filters. Practical filter ideas include authentication filters, logging and auditing filters, image conversion filters, data compression filters, encryption filters, tokenizing filters, filters that trigger resource access events, XSLT filters that transform XML content, or MIME-type chain filters (just like servlet chaining).