How to access exception/stacktrace in Velocity template resolved by web.xml's error-page?

Posted by kermit on Stack Overflow See other posts from Stack Overflow or by kermit
Published on 2010-03-19T03:15:19Z Indexed on 2010/03/19 3:21 UTC
Read the original article Hit count: 293

Filed under:
|
|

I would like to print the cause of the HTTP Error 500 on my Velocity template but am having difficulty figuring out how this can be done.

My web.xml is configured with:

 <error-page>
  <error-code>500</error-code>
  <location>/error/500.vm</location>
 </error-page>

My 500.vm page is resolving as expected but how do I access the exception which resulted in this error page?

Thanks~

© Stack Overflow or respective owner

Related posts about velocity

Related posts about exception