IntelliJ IDEA 15.0 Help

Struts 2

IntelliJ IDEA supports the Struts 2 framework for creating Java EE and Web Applications.

Struts 2 support is enabled through the Web and Struts 2 facets. The dedicated facets that contain settings, configuration file paths, and validation rules determine the structure of the module so that IntelliJ IDEA detects how to treat the module contents.

A Struts 2 facet can be only created as a child of a Web facet. Only one Struts 2 facet is allowed in a module.

IntelliJ IDEA provides the following support of the Struts 2 framework:

  • Automatic creation of the specific module structure and the Web application deployment descriptor web.xml based on the dedicated Web facet.
  • Downloading and adding the necessary libraries automatically and creating the Struts 2 application configuration file struts.xml based on the dedicated Struts 2 facet.
  • A file set manager, library validator, and automatic detection of configuration settings.
  • Coding assistance, including code completion, syntax and error highlighting, documentation lookup, and refactoring.
  • Multiple code inspections that spot code issues specific for Struts 2.
  • Smart navigation across Java, JSP and XML files.
  • Support for inplace JavaScript and CSS code.
  • Graphic view for the struts.xml configuration file.
  • Java EE preview for JSP and JSF pages.
  • Structure tool window that provides navigation across the native Struts 2 application structure and displays Struts 2 actions.

To develop a Web application using Struts 2, follow these general steps

  1. Enable support of Web and Struts 2 development.
  2. Create and configure general Web application elements: servlets, filters, and listeners.
  3. Create and configure Struts 2 specific elements.
  4. Populate your application with the necessary classes.
  5. Deploy and run your application.

See Also

Last modified: 10 December 2015