Yes, you can do that.
1. Make sure your web.xml has an error-page declaration for
exception-type java.lang.Throwable. (Throwable catches things like
OutOfMemoryError, as well as Exception and its subclasses.)
2. In your error handling page the exception is available as a request
attribute, either
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();