[go: up one dir, main page]

0% found this document useful (0 votes)
24 views1 page

Filtering Requests and Responses

Filters can transform requests and responses by modifying headers and data, querying requests, and interacting with external resources. Filters are configured in a chain to filter specific web resources during deployment and loading by a web container.

Uploaded by

damayanti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views1 page

Filtering Requests and Responses

Filters can transform requests and responses by modifying headers and data, querying requests, and interacting with external resources. Filters are configured in a chain to filter specific web resources during deployment and loading by a web container.

Uploaded by

damayanti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Filtering Requests and Responses

A filter is an object that can transform the header or content or both of a request or response. Filters differ
from Web components in that they usually do not themselves create a response. Instead, a filter provides
functionality that can be "attached" to any kind of Web resource. As a consequence, a filter should not
have any dependencies on a Web resource for which it is acting as a filter, so that it can be composable
with more than one type of Web resource. The main tasks that a filter can perform are as follows:
 Query the request and act accordingly.
 Block the request-and-response pair from passing any further.
 Modify the request headers and data. You do this by providing a customized version of the
request.
 Modify the response headers and data. You do this by providing a customized version of the
response.
 Interact with external resources.
Applications of filters include authentication, logging, image conversion, data compression, encryption,
tokenizing streams, and XML transformations.
You can configure a Web resource to be filtered by a chain of zero, one, or more filters in a specific order.
This chain is specified when the Web application containing the component is deployed and is
instantiated when a Web container loads the component.
In summary, the tasks involved in using filters include
 Programming the filter
 Programming customized requests and responses
 Specifying the filter chain for each Web resource

You might also like