Defining the Filter Mapping Element
You can map filters to a URL or a servlet name. When a filter is mapped to a URL, the filter applies to every servlet and JSP page in your Web application. When a filter is mapped to a servlet name, it applies to a single servlet or JSP.
provides the facilities to configure,
Filter Mapping elements using
Web Module Editor
The tab is synchronized with the
tab where the
web.xml code is generated based on
the settings you specify.
To define a filter mapping
- Select the required filter in the Filters Configured pane, tab General, and switch to the Assembly Descriptor tab.
- In the Filter Mappings pane, click . A new row appears with the Filter text box displaying the name of the selected filter.
- To define a URL-mapping, in the
text box, type the URL pattern that associates the filter with the URLs that call the filter.
A URL pattern may contain a subset of US-ASCII characters. Avoid using other values.
- To define a servlet-mapping, in the Servlet drop-down list select the relevant servlet.
To edit a filter mapping
To remove a filter mapping
- Select the relevant row and click .