Hi everyone. I'm using Struts2, and i'm trying to create a custom error page.
The default Tomcat error page show something like this: _____________________ HTTP Status 500 type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: java.lang.NullPointerException ... (full stack trace) root cause java.lang.NullPointerException ... (full stack trace) ___________________ I searched on google about creating custom error page. And I have found to do something like this: ___________________ Exception Type: <%= request.getAttribute("javax.servlet.error.exception_type") %><br /> Error Message: <%= request.getAttribute("javax.servlet.error.message") %><br /> Request URI: <%= request.getAttribute("javax.servlet.error.request_uri") %><br /> Throwable e = (Throwable) request.getAttribute("javax.servlet.error.exception"); if (e instanceof ServletException) { // ... } else { // .. } ___________________ The problem is that I always get the "root cause" and I have not found any way to get the "ServletException" that has a different stacktrace from the "root cause". Is this related to Struts2? Where can i found the ServletException? in which attribute? Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]