Update Struts dependencies to 2.5.
Remove the following plugin dependencies because they were dropped and aren't supported anymore.
- Dojo Plugin
- Codebehind Plugin
- JSF Plugin
- Struts1 Plugin
Please be aware that the framework is using Log4j2 now as a main logging layer, the existing old logging layer is deprecated and will be removed soon. Log4j2 supports many different logging implementations, please check documentations for more details.
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter was moved to
In web.xml replace this:
There were other package changes, please read Version Notes 2.5 for more details.
Struts DTD was updated to 2.5 version.
In struts.xml replace 2.3 DTD version:
id attribute was replaced with
var attribute in the following tags.
If you have something like that in your code:
change it to:
name attribute is replaced with
escape attribute was renamed to
<s:div> tag was dropped.
<s:div> with plain HTML
If you have field names which starts with single lower case letter, for example:
change accessors to
Or better yet, change field names to not contain single lower case letter:
For additional info see WW-3909.
Depending on from which version of struts you upgrade and whether you used
tiles3-plugin you may need to do different steps.
Struts 2.5 just provides a
tiles-plugin which uses Tiles3. So support for Tiles2 has been dropped as well as the name
Now the only maven dependency looks like this:
You may need to update DTD in your
tiles.xml files to Tiles3:
A Listener in
web.xml is required. It is not necessary to configure paths to
tiles.xml files here as they are picked up automatically.
Optionally you may remove TilesDefinitions from XML and annotate actions instead. See Tiles Plugin for more details.
Temp/Work directory of ApplicationServer/ServletContainer
Users reported it was necessary for them to remove temp/work directory of their ApplicationServer/ServletContainer. Likely to force server to recompile JSPs.