IntelliJ IDEA 14.1.0 Help

New Servlet Dialog

Web Tool Window | Context Menu of a Web module | New | Servlet


Specify the settings for the new servlet.

Item Description
Name The "root part" of the servlet name.

This name (along with its prefix and suffix) will be used either in the <servlet-name> element in web.xml or in the servlet class @WebServlet annotation.

You can specify the servlet name prefix and suffix (the <servlet-name> tag Prefix and Suffix fields on the Java EE Names tab of the Editor | Code Style | Java page in the Settings dialog). In that case, the prefix and the suffix are added before and after the specified name automatically.

Package The name of the package in which the new servlet should be created.

Click browseButton. Then select an existing package or click icon_newFolder to create a new package.

Class The fully qualified name of the servlet class.

The default class name is generated using the package name, the class name prefix, the servlet name, and the class name suffix.

The class name prefix and suffix are set in the Settings dialog. (The Servlet Class Prefix and Suffix fields on the Java EE Names tab of the Editor | Code Style | Java page.)

Create Java EE 6 annotated class Select this check box if you want the new servlet class to be @WebServlet-annotated. (Otherwise, the servlet name - class mapping is added to web.xml.)

See Also

Procedures:

Reference:

Web Resources:

Last modified: 24 March 2015
comments powered by Disqus