Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titlemaven dependecy for tiles-plugin
        <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
languagexml
titletiles3 dtd
<!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
languagexml
titleStrutsTilesListener in web.xml
<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.

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.

New Locale aware conversion logic

As from Struts 2.5.12 a new conversion logic was introduced which can affect your applications when using uncommon solutions. One of these is to use a number literals in Freemarker template. In such case Freemarker treats them as numbers (as BigDecimals) and Struts logic converts them to a string with decimal zero, see the example below:

Code Block
languagexml
<@s.textfield name="userId" value=35/>

this snippet will produce the following Html control:

Code Block
html
html
<input type="text" name="userId" value="35.

...

0"/>

To resolves this problem you must add quotes around the value:

Code Block
html
html
<@s.textfield name="userId" value="35"/>

This is due how Freemarker treats a number literals.