IntelliJ IDEA 2022.2 Help

Create and delete Web application elements

This topic describes general procedures for elements in a Web module.

Add an element to a Web module

  1. In the Project tool window (Alt+1 or View | Tool Windows | Project), right-click a package located in a Web module and select New | Servlet/Filter/Listener.

  2. In the New Servlet/Filter/Listener dialog that opens, type the name of the element.

  3. Specify the package where the element will be created.

  4. Specify the class that implements the element.

  5. Click OK. A new class is created and opened in the editor.

    Creating a new Servlet

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.

Last modified: 06 July 2022