IntelliJ IDEA 2016.3 Help

Defining the Servlet Element

On this page:

Introduction

The Servlet element defines the name of the servlet and specifies the compiled class that implements it. Alternatively, instead of specifying a servlet class, you can specify a JSP.

The Servlet element also contains definitions of initialization attributes.

IntelliJ IDEA provides the facilities to configure, remove, and edit Servlet elements using the IntelliJ IDEA editor.

Note that you can map URL pattern that associates the servlet with the set of URLs that call the servlet using annotations in the editor.

General steps

Defining the Servlet element includes:

  • Specifying the servlet name and the name of the package where the servlet will be created.
  • Customizing the initialization process by specifying the initialization attributes of the servlet.

Defining a servlet

To define a servlet

  1. Configure a new servlet.
  2. Click OK in the New Servlet dialog box. The new servlet is added to the list in the Servlets Configured pane.
  3. Specify the servlet initialization parameters.

Removing a servlet

To remove a servlet

  • Select the servlet in the Servlets Configured pane and click /help/img/idea/2016.3/delete.png or select Remove in the context menu.

See Also

Last modified: 29 November 2016