IntelliJ IDEA 2016.2 Help

Specifying the Servlet Name and the Target Package

To define the servlet name and the target package where the servlet will be created

  1. Open the New Servlet dialog box from the Project tool window.

    Alternatively, open web.xml and switch to the General tab. Then click add in the Servlets Configured pane.

  2. In the <servlet-name> text box, specify the root part of the new servlet name.
  3. In the Package text box, specify the name of the target package where the new servlet will be generated. If necessary, use the ellypsis button. The Choose Servlet Package dialog box opens.
  4. Select the relevant package or create a new one by clicking icon_newFolder. Click OK. You return to the New Servlet dialog box.
  5. In the Servlet Class text box, type the name of the class that implements the new servlet. If necessary, use the ellypsis button. The Choose Servlet Class dialog box opens.
  6. Select the relevant class and click OK. You return to the New Servlet dialog box.
  7. Click OK. The General tab with the Servlet Initialization Params pane displays.
  8. Proceed with specifying the initialization attributes and the context-initialization parameters of the servlet.

See Also

Last modified: 23 November 2016