Saturday, June 23, 2012

Telling the web server to show my error message

My research on error page has been done. It was just as simple as by adding following code into web.xml:

< error-code >
   < exception-type > java.lang.Throwable <  exception-type >
   < location > /jsp/MyErrorPage.html < /location >
< /error-code >

The above pieces is to tell the server that whatever shit throwing out, just show MyErrorPage.html, and hiding the meaningless stack trace from users.

No comments: