title: How do I have common error page templates with tiles in a Spring/MVC 3.0 app?
body: <p>I have a Spring MVC/3.0 app using tiles as it's view, this is working fine however I can't figure out how to get the error pages to also use tiles.</p>
  
  <p>I have in my <code>web.xml</code></p>
  
  <pre><code>&lt;error-page&gt;
    &lt;error-code&gt;404&lt;/error-code&gt;
    &lt;location&gt;/WEB-INF/error/404.jsp&lt;/location&gt;
  &lt;/error-page&gt;
  </code></pre>
  
  <p>which works fine as an ordinary view NOT using tiles, however when I change the location to one of the view names, the view is not found and renders the ordinary error page.</p>
  
  <p>My <code>tiles.xml</code> file for the view contains the following definition</p>
  
  <pre><code>&lt;definition name="404" extends="standardLayout"&gt;
    &lt;put-attribute name="body" value="/WEB-INF/error/404.jsp" /&gt;
  &lt;/definition&gt;
  </code></pre>
  
  <p>I'm configuring tiles through spring as follows:</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/**/tiles.xml&lt;/value&gt;
      &lt;/list&gt;
    &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I'm suspecting this is all due to the view not coming from spring itself?</p>