THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- Include the struts-tiles3-plugin as a dependency in your web application, do not include the old struts2-tiles-plugin! If you are using maven3, the dependency configuration will be similar to:
Code Block xml xml <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-tiles3-plugin</artifactId> <version>${version.tiles}</version> <scope>compile</scope> </dependency>
- Register the tiles listener.
Code Block xml xml <listener> <listener-class>org.apache.tiles.extras.complete.CompleteAutoloadTilesListener</listener-class> </listener>
- All package definitions which require tiles support must either extend the tiles-default package or must register the Tiles 3 Result type definition.
Code Block xml xml <result-types> <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult"/> </result-types>
- Configure your actions to utilize a tiles definition:
Code Block xml xml <action name="sample" class="org.apache.struts2.tiles.example.SampleAction" > <result name="success" type="tiles">tilesWorks</result> </action>
...