title: Spring MVC & Tiles integration
body: <p>Firstly I know that Spring MVC has good integration with Tiles. But my problem is as below:</p>
  
  <p>I have configured my web.xml as</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;description&gt;Spring Dispatcher Servlet&lt;/description&gt;
      &lt;servlet-name&gt;Dispatcher&lt;/servlet-name&gt;
      &lt;servlet-class&gt;
          org.springframework.web.servlet.DispatcherServlet
      &lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Dispatcher&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>And my Dispatcher-servlet.xml is configured as below:</p>
  
  <pre><code>&lt;bean class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"&gt; 
      &lt;property name="definitions"&gt;
          &lt;list&gt;
              &lt;value&gt;
                  /WEB-INF/tiles-defs/base-layout.xml
              &lt;/value&gt;
              &lt;value&gt;
                  /WEB-INF/tiles-defs/application-layout.xml
              &lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt; 
  &lt;/bean&gt;
  
  &lt;bean id="tilesViewResolver" 
              class="org.springframework.web.servlet.view.UrlBasedViewResolver"&gt;
      &lt;property name="viewClass" 
              value="org.springframework.web.servlet.view.tiles2.TilesView" /&gt;
      &lt;property name="order" value="1" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p><strong>Please Note that Dispatcher servlet is mapped to handle all requests. I don't want to configure it in way, such that it can handle only specif requests, say for example *.hmtl or *.do or *.form because i want my URL to be neat, that's a requirement.</strong> </p>
  
  <p>I have tiles definition as below</p>
  
  <pre><code>&lt;tiles-definitions&gt;
  
      &lt;definition name="publicLayout" .
              template="/WEB-INF/tiles-layouts/publicLayout.jsp"&gt;
          &lt;put-attribute name="title" value="Home Page" /&gt;
          &lt;put-attribute name="body" value="" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="home" extends="publicLayout"&gt;
          &lt;put-attribute name="body" value="/WEB-INF/jsp/home.jsp" /&gt;
      &lt;/definition&gt;
  
  &lt;/tiles-definitions&gt;
  </code></pre>
  
  <p>Now when i make a HTTP request to say a URL "http://localhost:8080/myapp/home", a annotated controller mapped with request-mapping "/home" handles the request and finally returns a ModelAndView with view name "home". </p>
  
  <p>Finally when dispatcher servlet tries to render the page it says </p>
  
  <blockquote>
    <p>No mapping found for HTTP request with URI
    [/myapp/WEB-INF/tiles-layouts/publicLayout.jsp]</p>
  </blockquote>
  
  <p>But when i change my dispatcher servlet mapping such that *.html, its working fine, which i don't want to do.</p>
  
  <p>What can be done here.?? i think its a very common problem.</p>