title: Global exception page in Apache Tiles and Spring MVC
body: <p>When an unhandled exception is throws (e.g. a <code>RuntimeException</code>), then I want to show a common error page.</p>
  
  <p>I want to achieve a few things:</p>
  
  <ul>
  <li>reuse a HTML template (use a common "frame" with header etc.) and place exception info in the body</li>
  <li>provide some basic info about the exception in the body document</li>
  </ul>
  
  <p>I am using Apache Tiles and Spring MVC. What is a good approach to my problem?</p>
  
  <p>Part of my tiles-definitions:</p>
  
  <pre><code>&lt;tiles-definitions&gt;
      &lt;definition name="common" template="/WEB-INF/jsp/common.jsp"&gt;
          &lt;put-attribute name="header" value="header"/&gt;
          &lt;put-attribute name="footer" value="/WEB-INF/jsp/footer.jsp"/&gt;
      &lt;/definition&gt;
     ...
     &lt;definition name="main" extends="common"&gt;
         &lt;put-attribute name="body" value="/WEB-INF/jsp/main.jsp"/&gt;
     &lt;/definition&gt;
  &lt;/tiles-definitions&gt;
  </code></pre>
  
  <p>Ideally I'd like to specify a definition for an exception page by setting the <code>body</code> attribute...</p>