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

Tiles Rendering Utilities

The core package of Tiles contains utilities to render Tiles definitions without the need of a JSP page or a supporting framework.

TilesDispatchServlet

The TilesDispatchServlet is a servlet that intercepts the URLs ending with ".tiles" and render the definition whose name is the path name before the ".tiles" part.

For example, if you call the testdispatchservlet.tiles path, the rendered definition will be testdispatchservlet.

You can configure the TilesDispatchServlet this way:

<servlet>
    <servlet-name>Tiles Dispatch Servlet</servlet-name>
    <servlet-class>org.apache.tiles.web.util.TilesDispatchServlet</servlet-class>
</servlet>
...
<servlet-mapping>
    <servlet-name>Tiles Dispatch Servlet</servlet-name>
    <url-pattern>*.tiles</url-pattern>
</servlet-mapping>

TilesDecorationFilter

You can use the TilesDecorationFilter to use Tiles as a decorator framework. All the requests intercepted by the filter will be put inside the configured attribute of the configured definition, and then that definition is rendered.

You can configure the filter this way:

<filter>
    <filter-name>Tiles Decoration Filter</filter-name>
    <filter-class>org.apache.tiles.web.TilesDecorationFilter</filter-class>
    <init-param>
        <param-name>definition</param-name>
        <param-value>test.definition</param-value>
    </init-param>
    <init-param>
        <param-name>attribute-name</param-name>
        <param-value>body</param-value>
    </init-param>
</filter>