How can I log exceptions thrown by my
JSP pages? I want to catch and log ALL errors (whether thrown by Action classes, business objects or JSPs...).
If I understand the process correctly, I should be able to extend the
Struts ExceptionHandler and use something like log4j to log exceptions. The problem I have is that JSP errors don't seem to be being directed to my new Global Exception Handler, which I've configured in struts-config.xml
Currently when a JSP generated exception crops up, the application displays a blank screen because the response is already committed, so the forward to my error.jsp fails too!
I can get the exceptions from the server logs, but I also want them to be logged to my application log, so that everything is centralised. Am I missing the point? Am I not supposed to want to log JSP errors?
For instance, I know what caused the following, and can fix it, but how do I get a handle on it to log it!
Thanks for any assistance: