title: Struts 2 + error pages + configuration
body: <p>I'm trying to configure a global error page for my struts 2 project. So far i've done the following:</p>
  
  <pre><code>&lt;global-results&gt;
    &lt;result name="Exception"&gt;/jsp/common/errorPage.jsp&lt;/result&gt;
  &lt;/global-results&gt;
  &lt;global-exception-mappings&gt;
   &lt;exception-mapping exception="java.lang.Throwable" result="Exception" /&gt;
  &lt;/global-exception-mappings&gt;
  </code></pre>
  
  <p>And in my web.xml:</p>
  
  <pre><code>&lt;error-page&gt;
    &lt;exception-type&gt;java.lang.Throwable&lt;/exception-type&gt;
    &lt;location&gt;/jsp/common/errorPage.jsp&lt;/location&gt;
  &lt;/error-page&gt;
  &lt;error-page&gt;
   &lt;error-code&gt;404&lt;/error-code&gt;
   &lt;location&gt;/jsp/common/errorPage.jsp&lt;/location&gt;
  &lt;/error-page&gt;
  </code></pre>
  
  <p>Struts handles all /* requests. When I'm deliberately trying to go to an unmapped location, I'm getting the error stack trace stating </p>
  
  <blockquote>
    <p>There is no Action mapped for namespace / and action name
    checkErrorPage. - [unknown location]</p>
  </blockquote>
  
  <p>When I'm throwing an error in an mapped action, I'm getting the stack trace again instead of the error page. I'm rethrowing the error as suggested in other solutions on the web, but it's still not redirecting to the error page.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks</p>