Filter Mappings Property Editor
 |
Note that this feature might not be included in
your version of the IDE. If it is not available, you can edit the deployment
descriptor (web.xml) file using the editor of your choice.
For more information, see Java Servlet 2.3 Specification available
at http://java.sun.com/products/servlet . |
The Filter Mappings property editor provides a way to add, edit, or remove
filter mappings in a web module deployment descriptor (web.xml
).
Once a filter has been declared in the deployment descriptor, filter mappings
are used by the container to determine which filters to apply to a request,
and in what order. Filters can be associated with a servlet using the servlet-name
element. Filters can be associated with groups of servlets and static content
using the url-pattern
style of filter mapping. The order the container
uses in building the chain of filters to be applied for a particular request
URI is:
- The url-pattern matching filter mappings in the same order that these elements
appear in the deployment descriptor, and then
- The servlet-name matching filter mappings in the same order as these elements
appear in the deployment descriptor.
To display the Filter Mappings property editor:
- Click the Deployment pane of the web.xml property sheet.
- Click the Filter Mappings value field to make the ellipsis button (...)
appear. Then click the ellipsis button.
To add filter mappings:
- In the Filter Mappings property editor, click the Add button. The Add Filter
Mapping dialog box appears.
- In the Filter Logical Name field, choose the filter's logical name from
the list of values. This name is used to map the filter.
- In the URL Pattern field, type a valid URL pattern.
- In the Servlet field, type the name of the appropriate servlet, or choose
it from the list.
- Click OK. The new filter mapping appears in the Filter Mappings property editor.
To edit filter mappings:
- In the Filter Mappings property editor, click the desired filter-mapping,
then click the Edit button.
The Edit Filter Mapping dialog box appears.
- Edit the filter mapping as described above.
- Click OK. The edited filter mapping appears in the Filters property editor.
To remove filter mappings:
- In the Filter Mappings property editor, click the filter mapping to be removed,
and then click Remove. The filter mapping is removed from the table.
- Click OK to confirm the action or Cancel to stop the action.
Legal Notices