title: Struts 2 Error Handling - How do I get the stackTrace and exception attribute?
body: <p>I'm working with Struts2 and I'm having an issue with it's error handling mechanism.
  What I would like to do is to get the <strong>stackTrace</strong> and <strong>exception</strong>
  attributes in order to use it inside an action class (as for printing on
  the console) or inside a JSP page (without using taglibs).</p>
  
  <p>Bellow there is a snippet of my struts.xml file:</p>
  
  <pre><code>&lt;default-interceptor-ref name="defaultStack"/&gt;
  
      &lt;global-results&gt;
          &lt;result name="Exception" type="redirect"&gt;/error.action&lt;/result&gt;
      &lt;/global-results&gt;
  
      &lt;global-exception-mappings&gt;
          &lt;exception-mapping result="Exception"   exception="java.lang.Exception" /&gt;
      &lt;/global-exception-mappings&gt;
  
      &lt;action name="error" class="fend.ErrorAction"&gt;
          &lt;result&gt;/error.jsp&lt;/result&gt;
          &lt;interceptor-ref name="configStack"/&gt;
      &lt;/action&gt;
  </code></pre>
  
  <p>Thanks in advance!</p>