This project has retired. For details please refer to its Attic page.
Apache Tiles - Framework - Migrating Tiles configuration files

Tiles configuration files translation

Most of XML elements and attributes can be translated one-to-one or many-to-one without losing functionality from the 1.1-1.3 to the 2.0 DTD version.

Header

The new header to be put in your Tiles definitions files is:

 <!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">

Definitions attributes

Struts-Tiles Tiles 2
<component-definitions>
<tiles-definitions>
<tiles-definitions>
page
path
template
template
controllerClass
controllerUrl
preparer [1]
  • [1] The default behaviour of preparer is to create and use a single instance of the specified class. Anyway it is still possible to use a URL as a preparer under a Struts 1 environment by using the Struts 1 - Tiles 2 integration module, still under development.

Putting and adding attributes values

The page attribute type has been removed, use template instead.

The rest of the conversion is in the table below.

Struts-Tiles Tiles 2
<put> <put-attribute>
<putList> <put-attribute-list>
<add> <add-attribute> [2]
<add-list-attribute> [3]
content
value
value
direct="true" type="string"
  • [2] <add-attribute> is used when it is needed to add a single attribute to a list attribute.
  • [3] <add-list-attribute> is used when it is needed to a list attribute as an element of another list attribute.