title: multiple error-code configuration web.xml
body: <p>I'd like to direct all errors to my Errorsevlet without specifying all the codes explicitly.  Is there any way to do like that? </p>
  
  <pre><code>&lt;error-page&gt;
     &lt;error-code&gt;400&lt;/error-code&gt;
     &lt;location&gt;/servlet/com.abc.servlet.ErrorServlet&lt;/location&gt;
  &lt;/error-page&gt;
  </code></pre>
  
  <p>**And after reaching the ErrorServlet how can i get the stack trace of the error in the servlet. So that i can email the details when one error occurs. **</p>