This project has retired. For details please refer to its Attic page.
Apache Tiles - Framework - Wildcard support

Wildcard support

By default, Tiles 2.1 supports wildcards in definition names. Wilcards help a lot in writing less code to declare your definitions. Take this example:

<definition name="test.definition*.message*" template="/layout{1}.jsp">
    <put-attribute name="title"  value="This definition has a message: {2}."/>
    <put-attribute name="header" value="/header.jsp"/>
    <put-attribute name="body"   value="/body.jsp"/>
</definition>

If you insert a definition that matches the definition, for example:

<tiles:insertDefinition name="test.definitionOne.messageThisIsAMessage" />

The definition is automatically mapped, replacing placeholders, marked by curly brackets, with the value of matched definitions. In this case:

<definition name="test.definitionOne.messageThisIsAMessage" template="/layoutOne.jsp">
    <put-attribute name="title"  value="This definition has a message: ThisIsAMessage."/>
    <put-attribute name="header" value="/header.jsp"/>
    <put-attribute name="body"   value="/body.jsp"/>
</definition>