title: sitemesh and tiles 2.1 integration with spring MVC
body: <p>Is posible to integrate sitemesh and tiles 2.1 with spring mvc ?
  I want to composite the layout with tiles and then decorate with sitemesh.</p>
  
  <p>I was using tiles like that.</p>
  
  <pre><code>   &lt;bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"&gt;
          &lt;property name="definitions"&gt;
              &lt;list&gt;
                  &lt;value&gt;/WEB-INF/layouts/layouts.xml&lt;/value&gt;
                  &lt;value&gt;/WEB-INF/views.xml&lt;/value&gt;
                  &lt;value&gt;/WEB-INF/hotels/views.xml&lt;/value&gt;
                  &lt;value&gt;/WEB-INF/hotels/booking/views.xml&lt;/value&gt;
                                  &lt;value&gt;/WEB-INF/cliente/views.xml&lt;/value&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>Then I configure sitemesh in the xml.</p>
  
  <pre><code> &lt;filter&gt;
          &lt;filter-name&gt;sitemesh&lt;/filter-name&gt;
          &lt;filter-class&gt;com.opensymphony.sitemesh.webapp.SiteMeshFilter&lt;/filter-class&gt;
      &lt;/filter&gt;
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;sitemesh&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>And then I added decorator</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;decorators defaultdir="/styles"&gt;
  
  
      &lt;decorator page="application/themeManager/theme.jsp" name="theme"&gt;
          &lt;pattern&gt;/spring/hotels/index&lt;/pattern&gt;
  
      &lt;/decorator&gt;
  
  
  &lt;/decorators&gt;
  </code></pre>
  
  <p>But this doesn't do nothing, I think that tiles avoid to sitemesh to process the page, how to do this ?</p>
  
  <p>This the  sitemesh.xml I just using the default that comes with the examples</p>
  
  <pre><code>&lt;sitemesh&gt;
      &lt;property name="decorators-file" value="/WEB-INF/decorators.xml"/&gt;
        &lt;excludes file="${decorators-file}"/&gt;
      &lt;!--&lt;excludes file="/WEB-INF/decorators.xml"/&gt;--&gt;
  
      &lt;page-parsers&gt;
          &lt;parser content-type="text/html" class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" /&gt;
      &lt;/page-parsers&gt;
  
      &lt;decorator-mappers&gt;
  
          &lt;mapper class="com.opensymphony.module.sitemesh.mapper.PageDecoratorMapper"&gt;
              &lt;param name="property.1" value="meta.decorator" /&gt;
              &lt;param name="property.2" value="decorator" /&gt;
          &lt;/mapper&gt;
  
          &lt;mapper class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"&gt;
          &lt;/mapper&gt;
  
          &lt;mapper class="com.opensymphony.module.sitemesh.mapper.AgentDecoratorMapper"&gt;
              &lt;param name="match.MSIE" value="ie" /&gt;
              &lt;param name="match.Firefox" value="mozilla" /&gt;
              &lt;param name="match.Opera" value="opera" /&gt;
              &lt;param name="match.Lynx" value="lynx" /&gt;
          &lt;/mapper&gt;
  
          &lt;mapper class="com.opensymphony.module.sitemesh.mapper.PrintableDecoratorMapper"&gt;
              &lt;param name="decorator" value="printable" /&gt;
              &lt;param name="parameter.name" value="printable" /&gt;
              &lt;param name="parameter.value" value="true" /&gt;
          &lt;/mapper&gt;
  
          &lt;mapper class="com.opensymphony.module.sitemesh.mapper.RobotDecoratorMapper"&gt;
              &lt;param name="decorator" value="robot" /&gt;
          &lt;/mapper&gt;
  
          &lt;mapper class="com.opensymphony.module.sitemesh.mapper.ParameterDecoratorMapper"&gt;
              &lt;param name="decorator.parameter" value="decorator" /&gt;
              &lt;param name="parameter.name" value="confirm" /&gt;
              &lt;param name="parameter.value" value="true" /&gt;
          &lt;/mapper&gt;
  
          &lt;mapper class="com.opensymphony.module.sitemesh.mapper.FileDecoratorMapper"&gt;
          &lt;/mapper&gt;
  
          &lt;mapper class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper"&gt;
              &lt;param name="config" value="${decorators-file}" /&gt;
          &lt;/mapper&gt;
  
      &lt;/decorator-mappers&gt;
  
  &lt;/sitemesh&gt;
  </code></pre>