IntelliJ IDEA 13.1 Web Help

Some features described here are available in Ultimate edition only.

Java EE application development support in a module is represented by a Java EE Application facet. You can create such a facet when creating a project or module. You can as well add a Java EE Application facet to an existing Java module.

A module can have more than one Java EE Application facet.

Enabling Java EE application development support when creating a project or module
  1. Start creating a project or module from scratch (e.g. File | New Project or File | New Module). See also, Creating a Project from Scratch or Creating a Module from Scratch.
  2. On the first page of the wizard, select Java Module. Specify other settings as necessary and click Next. For more information, see Creating a Java Module.
  3. On the next page of the wizard (the Technologies page), in the left-hand pane, select JavaEE Application.
  4. In the right-hand part of the page, select the version of the Java EE specification to be supported from the Version list.
  5. Click Finish.
Enabling Java EE application development support for an existing module
  1. Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCommand SemicolonCommand SemicolonCommand Semicolon).
  2. In the leftmost pane, select Modules.
  3. In the pane to the right, select the module of interest.
  4. Click add (Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+Insert or Ctrl+NAlt+InsertCommand N or Control EnterControl N or Control EnterCommand N or Control Enter) and select JavaEE Application.
  5. Click OK in the Project Structure dialog.
Managing Java EE Application facet resources

Java EE application facet resources are initially represented by the deployment descriptor application.xml file. You can replace this file with a different one or regenerate this file. You can also create application-server-specific deployment descriptors if necessary.

  1. Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCommand SemicolonCommand SemicolonCommand Semicolon).
  2. In the leftmost pane, select Modules.
  3. In the pane to the right, expand the module of interest and select its Java EE application facet (shown as javaEEApplication).
  4. On the Java EE Application Facet page that open in the right-hand part of the dialog:
    • To replace the deployment descriptor file with a different application.xml file: under Deployment Descriptors, select the file and click edit1. In the dialog that opens, specify the path to the necessary file and click OK.
    • To regenerate application.xml: delete the existing file (delete) and then create a new file (add).
    • To create an application-server-specific descriptor file: click Add Application Server specific descriptor. In the dialog that opens, select the server and the associated options, and click OK.

      Once the file has been created, you can perform with it the same operations as with application.xml.

Fixing project configuration problems

Sometimes there may be project configuration problems related to the use of the Java EE application facet. IntelliJ IDEA informs you about such problems on the Java EE Application Facet page of the Project Structure dialog and suggests fixes. For example:

  • If the facet resources are not included in any of the existing project artifacts, click the Fix button and select the corresponding artifact from the list.
  • If no appropriate artifacts are currently configured, click the Create Artifact button and configure the artifact layout on the Artifacts page of the Project Structure dialog that opens.
  • If missing libraries are detected, click the Fix button to download the corresponding libraries.

See Also

Concepts:

Procedures:

Reference:

External Links:

Web Resources: