Skip to end of metadata
Go to start of metadata


Struts 2 Plugin for JetBrains IntelliJ IDEA provides tight and feature-rich integration to develop Struts 2 applications. Real productivity features (including refactoring support), smart assistance just everywhere as well as being a tool understanding the structure and framework will make you more productive instantly. No more countless wizards just generating some XML or code without much intelligence!



To get a quick overview watch these screencasts to see Struts 2 support "in action"

Navigation and Autocompletion: demonstrates basic navigation and autocompletion features
Spring integration: setting up Spring integration for your Struts 2 project
(star) Validator integration: new features in IDEA 11

more to follow soon...

IDEA versions


Some features may not be available in all versions.
IDEA 8+ means "IDEA 8 or any higher version"

Please see Struts2PluginChangeNotes for detailed information.

Getting started


"Hello World" with Struts 2 and IntelliJ IDEA 8 - Detailed introductory blog post by Tabrez Iqbal

About this page

All (main) features are grouped and listed below. Please check the following table to understand the status indicators.






in progress/mostly done




future planning



Starting with IntelliJ IDEA 12.1 icons have changed slightly.

Struts 2 facet

All plugin configuration settings are bundled in a dedicated facet. Simply attach a new Struts 2-facet to an existing Web-facet, create a fileset and add your struts.xml-files from all auto-scanned configuration files in your project and the plugin is ready to work.

Fileset configuration


struts-default.xml from struts2-core.jar as well as any struts-plugin.xml from plugins (e.g. Spring integration) have to be added additionally to the fileset.
Also make sure to add all files used via <include>.
10.0.2+: projects created using project wizard will include all struts.xml-files from Struts-JARs automatically
(warning) Many features will NOT work if this setup has not been performed properly (warning)

(tick) Dedicated facet with configuration options
(tick) File Set manager

Group and manage your struts.xml-files with an easy to use editor, providing maximum flexibility w/r to your project setup.

(tick) Detect struts.xml files not mapped to file sets

Spot setup errors easily, additionally providing a quickfix to add the unmapped struts.xml-files to any existing fileset.

(tick) Library validator/setup

Creates IDEA project/module-library and - if required - downloads all necessary JAR files required for Struts 2.

(minus) Library validator/setup for standard plugins (Spring, Tiles, JSF, ..)
(tick) Autodetection of Struts 2 facets

Existing struts.xml-files are recognized upon opening your project and a new S2 facet will be created automatically.

(tick) Integration with "New Project"

Add a blank ready-to-start Struts 2 application template by selecting Struts 2 from the list of available technologies. A S2-facet with default fileset and an empty struts.xml-file already mapped in web.xml will be created automatically, all necessary libraries will be setup as well.

IDE integration

(tick) "Go To Action/Package" by name

Press Ctrl+Shift+Alt+N (Go To -> Symbol) to quickly navigate to any Action/Package by simply entering its name (including wildcards):

(tick) "Navigate -> Related File"

Tip: just start typing to narrow down the result list of related items and press ENTER to navigate.

IDEA 10.5+
Use this shortcut to quickly navigate from any web-resource used in <result> to its <action>-declaration and/or Action-method.
IDEA 11+
Also vice versa from Action-class to <action>-declaration and any referenced result(s) files.
Navigate from Action-class to all corresponding validation.xml files.

(tick) Dedicated dictionary

IDEA 11+
A bundled dictionary providing Struts-specific words and acronyms integrates with IDEA's builtin spellchecker.

(tick) Dedicated icons Struts elements

Recognize Struts related configuration files or code at a glance throughout the IDE (Project/Packages View, Editor tabs, Autocompletion, …):


(tick) Autocompletion

Please see this screencast to see it "in action" (a small part only!).

Autocompletion (CTRL+Space) is available for virtually all tags and attributes, just give it a try:

(tick) Rename refactoring/Find Usages

Need to refactor your S2 application? No more manual search and replace - just use Rename refactoring (Shift+F6) or perform Find Usages (Alt+F7/Ctrl+Alt+F7):

(tick) Navigation to referenced elements

Simply Ctrl-click (or press Ctrl+B) on any element to navigate to its declaration - or take a peek without leaving the current editor using Quick Definition Lookup (Ctrl+Shift+I).

(tick) Highlighting of configuration/reference errors

Errors are highlighted immediately in the editor, additional validation is triggered for Make Project.
IDEA 7: see "Validation" tab in S2 facet for more options
IDEA 8+: see Settings->Compiler->Validation

(plus) Quickfixes

Various quickfixes to create missing elements etc.

(tick) struts.xml: restrict resolving to <result> value depending on result-type (e.g. Tiles, Velocity)

IDEA 10+
Completion will only show resources relevant for the given (or inherited) result type.

(plus) Configuration errors

Highlight common configuration errors or possible problems on-the-fly - while you're editing. Catch the bugs before time-consuming deploy & manual-test.

(tick) Structure View

Visually groups all relevant info with Autoscroll from/to source. Hint: searching for something in the tree? Just start typing its name to find it.

(tick) struts.xml: Pageflow graph

Graph of all actions and results makes it easy to understand the structure of your application.


Please see this screencast to see it in action: Validator integration

(tick) Navigation to/from corresponding Action-class

IDEA 11+
Autocompletion/Navigation to Action-class properties in <field> "name"
"Navigate -> Related File" from Action-class to corresponding validation.xml file(s).

(minus) Show validation.xml node(s) under corresponding Action-class (like GUI-Designer forms)
(tick) Create corresponding validation.xml-template from Action

IDEA 11+
Intention to create new ActionClassName-validation.xml from file template.

(tick) Structure View
(tick) I18N-support

IDEA 11+
Support for .properties-based I18N for <message> "key" (can be disabled in S2 facet, tab "Features").

Actions (JAVA/Groovy)

(tick) Navigation to Action-declaration in struts.xml

Simply click on the action icon in the left editor bar to quickly open up the corresponding mapping(s) in struts.xml:
IDEA 8.1.1+: Groovy support added

(tick) Navigate to result

IDEA 10.5+
Use the gutter icon (or use Navigate->Related File) to directly navigate to any result(s) from your action method:


(tick) Navigation to Action-declaration/class

Click on the Action-class icon to quickly open the corresponding Action-class or Ctrl+click on the "action"-attribute open its struts.xml-definition:

(tick) Autocompletion/navigation for form properties

IDEA 11+
Form properties will be autocompleted/resolved in "surrounding" Action class. Ofcourse, rename refactoring and finding usages is supported here as well - no more manual search and replace necessary when updating your forms!

(plus) Autocompletion/navigation for other tags

Autocompletion is available for (almost) all attributes with static values.

(tick) JavaScript support

(plugin "JavaScript Support" must be enabled)
Enjoy the power of IDEA's powerful JavaScript-support within all S2 UI-tags.

(tick) CSS support

(IDEA 8+: plugin "CSS Support" must be enabled)
Define inline-styles (cssStyle) or reference existing CSS classes (cssClass).

(tick) I18N-support

IDEA 10+
Support for .properties-based I18N for <s:text> (can be disabled in S2 facet, tab "Features").

(plus) OGNL (Object Graph Navigation Library) Support

IDEA 11+
Provides editing, highlighting and autocompletion support for OGNL expressions - not just for Struts 2 applications.

Please see Struts 2 Plugin OGNL Support for details.

Plugins/3rd Party Extensions


Make sure to include struts-plugin.xml from corresponding plugin JAR to your Struts 2 fileset (configured in S2 facet in module settings).

(tick) Spring plugin

(plugin "Spring Support" must be enabled and Spring facet setup properly)

Please see this screencast to see Spring integration "in action".

Reference Spring beans where supported (e.g. in <action> "class", <constant> "value").

(plus) Convention plugin

Sophisticated configuration properties support

Autocompletion/navigation/usage search in annotations (WIP):

(tick) Tiles 2 plugin

Blog post

(plugin "Struts 1.x" must be enabled)
IDEA 8.1.1+
struts2-tiles-plugin.jar must be present as well as Tiles libraries. Configured tiles.xml-files will be set automatically as described in

(tick) Freemarker

(plugin "FreeMarker support" must be enabled)
All supported S2 taglibs are automatically available:

Global variables as well as properties provided from corresponding Action-class will be resolved:

(plus) Velocity

(plugin "Velocity support" must be enabled)
IDEA 10.x+
Add all global macros (struts.vm in struts2-core.jar) automatically.
Autocomplete all global variables.
Blog post with screen-shots

(plus) struts2-jQuery plugin

Provides autocompletion, navigation for JSP tags.
Blog post showing off some features

struts-jQuery plugin

  • No labels


  1. Hi Yann,

    Does "Integration with "New Project"" feature finish? I cannot find Struts 2 option when I create a new project in both Selena #7821 (with Struts 2 Plugin v0.40) and Diana #8280 (with Struts 2 plugin v0.38).

    1. This is STRPL-8, which will be available in Diana (IDEA 8) only, next EAP will contain this feature. Looking forward to your feedback.

      1. Thanks Yann. I will try it when next EAP will be released.

  2. Anonymous

    handytapestry seems to contain an OGNL language implementation.

    1. Indeed, but it's not OSS..

  3. Anonymous

  4. Anonymous

    A major clue to Mercury's geologic past came from the scientists' finding of volcanic

    vents along the margins of the Caloris basin, one of the solar system's largest and

    youngest impact basins. The group zeroed in on a kidney-shaped depression that was

    surrounded by a bright ring, lending a halo-like impression to the landscape.<a

    href="">kswchina</a> The scientists determined that the depression

    was a volcanic vent,and the bright ring around it was pyroclastic,<a

    href="">energy</a> remnants of lava that had been spewed

    outward, much like a volcanic fountain on Earth. Another larger ring surrounding the vent

    and halo ring showed that another type of volcanism,<a

    href="">gongwuyuan</a> called effusion, in which molten rock

    from within the planet oozes outward and covers the surface,<a

    href="">money</a> had occurred.<a

    href="">foreign</a> Together these deposits create a surface

    feature shaped like a volcanic shield - a clear sign to scientists that volcanic activity

    helped form the surrounding plains.

  5. Hi Yann,
    I'm thinking of retrofitting your Struts 2 plugin to work as Atlassian plugin development plugin since they're basically XWork / WebWork applications. Does that sound like it makes sense?


    1. Hello Jim,

      yes, there was some basic XWork support (which got removed). Please get in touch via mail if you want to know more.