What is a filter?
A filter is a reusable piece of code that can transform the content of HTTP requests, responses, and header information. Filters do not generally create a response or respond to a request as servlets do, rather they modify or adapt the requests for a resource, and modify or adapt responses from a resource.
Filters can act on dynamic or static content. For the purposes of this chapter, dynamic and static content are referred to as Web resources.
Among the types of functionality available to the developer needing to use filters are the following:
=> The accessing of a resource before a request to it is invoked.
=> The processing of the request for a resource before it is invoked.
=> The modification of request headers and data by wrapping the request in customized versions of the request object.
=> The modification of response headers and response data by providing customized versions of the response object.
=> The interception of an invocation of a resource after its call.
=> Actions on a servlet, on groups of servlets, or static content by zero, one, or more filters in a specifiable order.
Filters can act on dynamic or static content. For the purposes of this chapter, dynamic and static content are referred to as Web resources.
Among the types of functionality available to the developer needing to use filters are the following:
=> The accessing of a resource before a request to it is invoked.
=> The processing of the request for a resource before it is invoked.
=> The modification of request headers and data by wrapping the request in customized versions of the request object.
=> The modification of response headers and response data by providing customized versions of the response object.
=> The interception of an invocation of a resource after its call.
=> Actions on a servlet, on groups of servlets, or static content by zero, one, or more filters in a specifiable order.
Examples of Filtering Components
=> Authentication filters
=> Logging and auditing filters
=> Image conversion filters
=> Data compression filters
=> Encryption filters
=> Tokenizing filters
=> Filters that trigger resource access events
=> XSL/T filters that transform XML content
=> MIME-type chain filters
=> Caching filters.
=> Logging and auditing filters
=> Image conversion filters
=> Data compression filters
=> Encryption filters
=> Tokenizing filters
=> Filters that trigger resource access events
=> XSL/T filters that transform XML content
=> MIME-type chain filters
=> Caching filters.
No comments:
Post a Comment