I have a global exception handler configured as follows -
It works as desired (shows nice page to user and puts stack trace in log) when theres an exception Actions, but when there's an exception in the custom RequestProcessor that we have it shows the entire stck trace for wrro 500 in th ebrowser. I wonder why??? How can I take care of that as well? Moreover, are there any other execptions possible whcih will not be caught by this GlobalExceptionHandler?
TIA, - Manish
posted 11 years ago
Using the struts exception handlers, I think you can only catch exceptions thrown from Action classes. Exceptions could be thrown from JSPs and your request processor class which you will need to handle.
The JSP errors can be handled using the "page" directive isErrorPage and errorPage attributes. You could use try-catch too in your JSP and even in your request processor class. You can also handle exceptions thrown from a servlet in the web.xml by using <exception-type>.