Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Struts Tiles and Custom Error Pages

843838Apr 11 2006 — edited Apr 11 2006
Hey all,
I'm using struts tiles on tomcat 5. I'm looking for a simple and clean way to handle application (500) errors. Unfortunately tiles does not handle custom error pages the way I'd expect. In my web.xml I have defined a custom 500 error page.
<error-page>
   <error_code>500</error-code>
   <location>/error.jsp</location>
</error-page>
The error page displays as expected for ordinary jsp page erros. But for pages that are tiles the page just seems to half way load. I'm assuming because tomcat is able to compile header.jsp and body1.jsp but on body2.jsp it gets the error and just gives up and displays header.jsp and body1.jsp. Is there a different/better way to handle errors with tiles?

Ideally I would like to customize the error page further than the error number to say include a "pretty stack trace" with a "frieldly" error message if there is such a thing. I am already using an ErrorHandler class that catches different exceptions thrown by methods within my app, but its not a catch all which is what I'm looking for.

Thanks for any input.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 9 2006
Added on Apr 11 2006
1 comment
254 views