Servlet 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 Servlet Mappings property editor provides a way to add, edit, or remove servlet mappings from a web module. A servlet mapping directs the web container to forward a particular request to a specific named servlet, based on the request's URL pattern. You can also specify servlet mappings from the Servlet property editor for a particular servlet. Each entry corresponds to a <servlet-mapping> entry in the deployment descriptor.

To display the Servlet Mappings property editor:

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

To add servlet mappings:

  1. From the Servlet Mappings property editor, click the Add button. The Add Servlet Mapping dialog box appears.
  2. Type the desired servlet name in the Servlet Name text field.
  3. Type the desired URL pattern in the URL Pattern text field.
  4. Click OK. The new servlet mapping appears in the Servlet Mappings property editor.

To edit a servlet mapping:

  1. From the Servlet Mappings property editor, click the desired servlet mapping and the Edit button.
    The Edit Servlet Mapping dialog box appears.
  2. Edit the servlet name in the Servlet Name text field.
  3. Edit the URL pattern in the URL Pattern text field.
  4. Click OK. The edited servlet mapping appears in the Servlet Mappings property editor.

To remove servlet mappings:

  1. From the Servlet Mappings property editor, click the desired servlet mapping and the Remove button. The servlet 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