...
For additional info see WW-3909.
Tiles
Depending on from which version of struts you upgrade and whether you used tiles-plugin
or 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 tiles3-plugin
.
Now the only maven dependency looks like this:
Code Block | ||||
---|---|---|---|---|
| ||||
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-tiles-plugin</artifactId>
<version>${struts2.version}</version>
</dependency> |
You may need to update DTD in your tiles.xml
files to Tiles3:
Code Block | ||||
---|---|---|---|---|
| ||||
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
"http://tiles.apache.org/dtds/tiles-config_3_0.dtd"> |
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.
Code Block | ||||
---|---|---|---|---|
| ||||
<listener>
<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
</listener>
|
Optionally you may remove TilesDefinitions from XML and annotate actions instead. See Tiles Plugin for more details.