IntelliJ IDEA 2016.2 Help

Enabling Java EE Application Support

Java EE application development support in a module is represented by a Java EE Application facet.

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

Adding a Java EE Application facet to a module

  1. Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+S).
  2. In the leftmost pane, select Modules.
  3. In the pane to the right, select the module of interest.
  4. Click add (Alt+Insert) 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+S).
  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

Last modified: 23 November 2016