If a request is made for '/info/index.html', Spring will pass 'info/index' into the view. The first thing will be to look for 'info/index'
as a Tiles definition. Then a template definition of '.info.mainTemplate', which if found will dynamically have a body set on this definition.
If the previous aren't found, it is assumed a root definition exists. This would be '.mainTemplate'. If none of these exist,
a TilesException will be thrown.
TilesException is thrown.
The following are the default values for determining a Tiles definition for a request. If these aren't acceptable, they can be changed
using TilesUrlBasedViewResolver which is a subclass of UrlBasedViewResolver.
Or for AJAX support TilesAjaxUrlBasedViewResolver, which is a subclass of AjaxUrlBasedViewResolver,
can be used.
Table 1. DynamicTilesView Defaults
| Property | Default Value |
|---|---|
| tilesDefinitionName | mainTemplate |
| tilesBodyAttributeName | content |
| tilesDefinitionDelimiter | . |
<bean id="dynamicTilesViewResolver"
class="org.springbyexample.web.servlet.view.tiles2.TilesUrlBasedViewResolver">
<property name="viewClass" value="org.springbyexample.web.servlet.view.tiles2.DynamicTilesView" />
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
<property name="tilesDefinitionName" value="root" />
<property name="tilesBodyAttributeName" value="content" />
<property name="tilesDefinitionDelimiter" value="-" />
</bean>