IntelliJ IDEA 13.1 Web Help

Some features described here are available in Ultimate edition only.

This topic describes the general procedure for elements in a Web module.

To add an element to a web module
  1. Open the Web tool window by choosing View | Tool Windows | Web. The tool window displays all the modules with Web facets.
  2. Right-click the desired Web module node and choose New | Servlet/Filter/Listener on the context menu.

    Note

    To create a servlet or a filter, you can alternatively click the desired module node to open theWeb Module Editor, then switch to the General tab, and click add in the Servlets Configured or Filters Configured pane.

  3. In the New Servlet/Filter/Listener dialog box that opens, type the name of the element.
  4. Specify the package where the element will be created.
  5. Specify the class that implements the element.
  6. Click OK. A new class is created and opened in the General tab.
  7. Proceed as described in the relevant element-specific topic.
To remove an element from a web application
  1. In the Web tool window, select the element to be removed.
  2. On the context menu, choose Delete and click Yes in the confirmation dialog box.
  3. In the Select Elements to Delete dialog box, do one of the following:
    • To remove the class that implements the element, select the check box next to the name of the class.
    • To remove the selected element from the Web application and leave the class that implements the element, select the check box next to the name of the element.

      Warning

      Attempting to remove a class without removing the element that the class implements causes an error.

    Click Delete.

  4. View the entries of servlets implemented by the selected class in the Safe Delete Preview tool window.

Tip

Alternatively, to remove only a servlet or filter from a Web application, without removing its constituent class, select the required servlet or filter in the Servlets Configured or Filters Configured pane, tabGeneral, and click the Remove button delete or choose Remove on the context menu.

See Also

Procedures:

Reference:

Web Resources: