Filters Property Editor

Tip Note that this feature might not be available 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 Filters property editor provides a way to add, edit, or remove filter reference elements in a web module deployment descriptor (web.xml). Typically, filter references are added to the deployment descriptor using the New Wizard when you create the filter. A filter is defined in the deployment descriptor (web.xml) using the filter element. In the filter element, you declare:

To display the Filters property editor:

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

To add a filter reference element:

  1. In the Filters property editor, click the Add button. The Add Filter dialog box appears.
  2. In the Filter Logical Name field, type the filter's logical name. The logical name you supply is used to map the filter. Each filter name within a particular web module must be unique.
  3. In the Description field, type a description of the filter's funtionality.
  4. In the Filter Class field, type the fully qualified classname of the filter, for example, com.sun.myFilter.
  5. In the Display Name field, type a display name. The display name is a short name intended for display by tools. It does not need to be unique.
  6. In the Small Icon and Large Icon fields, type the names of the files containing the appropriate icon images. These file names are paths relative to the root of the WAR, for example, filterIcon.gif.
  7. In the Filter Mappings table, click Add to declare the mappings for the filter being added. The container uses the filter mapping declarations to decide which filters to apply to a request, and in what order.
  8. In the Init Parameters table, click Add to supply a name/value pair to be used as an initialization parameter of the servlet.
  9. Click OK. The new filter appears in the Filters property editor.

To edit a filter reference element:

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

To remove a filter reference element:

  1. In the Filters property editor, click the filter, then click Remove. The filter 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
Creating a Filter

Legal Notices