title: Struts2 Global Exception - Original Exception Source
body: <p>I'm using global exception mapping in Struts 2 as follows:</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;global-exception-mappings&gt;
      &lt;exception-mapping exception="java.lang.Exception" result="exception" /&gt;
  &lt;/global-exception-mappings&gt;
  
  &lt;!-- ******* ACTIONS ******  --&gt;
  &lt;action name="timeout" class="errorAction"&gt;
      &lt;interceptor-ref name="carsBasic" /&gt;
      &lt;interceptor-ref name="defaultStack" /&gt;
  &lt;result name="input"&gt;/WEB-INF/jsp/index.jsp&lt;/result&gt;
  &lt;/action&gt;
  </code></pre>
  
  <p>The flow is perfect but I'd like to know how to obtain which Action (and hopefully method) that threw the exception.</p>
  
  <p>in the <code>timeOut</code> action class, execute method, it correctly adds an <code>actionMessage</code> indicating 'an error' but in here I'd like to add code that is logged/emailed to me to show the offending class and method.</p>
  
  <p>Is this stored somewhere and how may I access it?</p>