Reputation: 863
I need to have a default error JSP page which is shown when an exception is thrown by the servlet, and that page will show the stacktrace..
How do I do that?? is there a right technique (provided by the API) or I have to do it manually?? I mean, sending the exception thrown as an attribute and then dealing with it by myself??
Thanks
Upvotes: 1
Views: 477
Reputation: 63734
You can configure the exception type and the JSP page to handle in web.xml, e.g:
<error-page>
<exception-type>UnhandledException</exception-type>
<location>UnhandledException.jsp</location>
</error-page>
There's an Oracle article here on the subject:
Upvotes: 3