Filter Mappings Property Editor

Tip 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:

  1. The url-pattern matching filter mappings in the same order that these elements appear in the deployment descriptor, and then
  2. 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:

  1. Click the Deployment pane of the web.xml property sheet.
  2. Click the Filter Mappings value field to make the ellipsis button (...) appear. Then click the ellipsis button.

To add filter mappings:

  1. In the Filter Mappings property editor, click the Add button. The Add Filter Mapping dialog box appears.
  2. 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.
  3. In the URL Pattern field, type a valid URL pattern.
  4. In the Servlet field, type the name of the appropriate servlet, or choose it from the list.
  5. Click OK. The new filter mapping appears in the Filter Mappings property editor.

To edit filter mappings:

  1. In the Filter Mappings property editor, click the desired filter-mapping, then click the Edit button.
    The Edit Filter Mapping dialog box appears.
  2. Edit the filter mapping as described above.
  3. Click OK. The edited filter mapping appears in the Filters property editor.

To remove filter mappings:

  1. 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.
  2. Click OK to confirm the action or Cancel to stop the action.
See also
Editing Web Module Deployment Properties

Legal Notices