Hello Eduard,

thank you for your answer. But I actually asked about run-time exceptions, like OutOfMemoryError. Do you think this approach will go for them too?

Andrew.

Eduard Wirch wrote:
Use this:

} catch (Exception e) {
    java.io.StringWriter stackTrace = new java.io.StringWriter();
    e.printStackTrace(new java.io.PrintWriter(stackTrace));
    request.setAttribute("error", stackTrace.toString());
}
-----Ursprüngliche Nachricht-----
Von: Andrew Stepanenko [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 14. März 2006 08:33
An: users@tomcat.apache.org
Betreff: Programmatic access to error 500 stack trace

Hello,

In our web app I as a developer want to know when the error 500 occurred (either because of OutOfMemory or whatever). So, I defined a custom error page in my web.xml and put there email sending logic. It is easy for me to get the error code, but can I access the actual exception stack trace so that I may embed it into my email message?

Thank you,
Andrew Stepanenko.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to