Manage Struts 2 elements
Struts 2 elements like actions, results, and interceptors as well as interaction between them is defined in the
<package> section of the struts.xml configuration file. The file is created automatically when you enable Struts 2 support for a module.
IntelliJ IDEA provides you with a friendly interface for editing struts.xml both in the text view and in diagram.
Switch between the views
Open struts.xml in the Project Tool Window and click Graph at the bottom of the screen.
Create a new Struts 2 application element
Right-click the struts.xml file in the Project Tool Window, select , and click the element you want to create.
The New... dialog opens.
Specify the element data and click OK.
The new element is created and displayed in the project tree. The corresponding source code is generated in the struts.xml.
Remove a Struts 2 application element
In the Project Tool Window, right-click the element you want to remove and select Delete.
Alternatively, switch to the struts.xml file and make the necessary changes manually.