Filters Property Editor
 |
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:
filter-name
, used to to map the filter to a servlet or URL
filter-class
, used by the container to identify the filter
type
init-params
, which are initialization parameters for the filter
- Large and small icons
- A textual description
- A display name for tool manipulation
To display the Filters property editor:
- Click the Deployment pane of the web.xml property sheet.
- Click the Filters value field to make the ellipsis button (...) appear.
Then click the ellipsis button.
To add a filter
reference element:
- In the Filters property editor, click the Add button. The Add Filter dialog
box appears.
- 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.
- In the Description field, type a description of the filter's funtionality.
- In the Filter Class field, type the fully qualified classname of the filter,
for example,
com.sun.myFilter
.
- 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.
- 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
.
- 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.
- In the Init Parameters table, click Add to supply a name/value pair to be
used as an initialization parameter of the servlet.
- Click OK. The new filter appears in the Filters property editor.
To edit a filter
reference element:
- In the Filters property editor, click the desired filter and then the Edit
button.
The Edit Filter dialog box appears.
- Edit the filter as described above.
- Click OK. The edited filter appears in the Filters property editor.
To remove a filter
reference element:
- In the Filters property editor, click the filter, then click Remove. The
filter is removed from the table.
- Click OK to confirm the action or Cancel to stop the action.
Legal Notices