Filters

Filter content

You can write a filter to modify requests and responses and then declare it on the Filters page. Filters implement the javax.servlet.Filter interface.

Table 12-5: Filter content properties for a JSP target

Setting

Value

Filter Name

Specify the name of the filter, for example, Image Filter

Filter Class

Specify the fully qualified class name of the filter, for example, com.acme.ImageServlet

Init Parameters

Specify initialization parameter names and values for each filter that you select

For more information about filters, see the Java Servlet specification or the EAServer Programmer’s Guide.

Filter mapping

The container uses the filter mappings you specify on the Filter Mapping page to determine how to apply the filters that have been defined to requests. You can apply a filter to a single servlet by specifying its name, or to a group of servlets and other Web content by specifying a URL pattern. For example, \* specifies that a filter applies to all servlets in the Web application. The filters are applied in the order in which they appear in the list of filter-mapping elements in the deployment descriptor.