wood burning stoves 2.0*
The moose likes JSF and the fly likes Tomcat ignoring 500 error-page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Tomcat ignoring 500 error-page" Watch "Tomcat ignoring 500 error-page" New topic
Author

Tomcat ignoring 500 error-page

Jason Irwin
Ranch Hand

Joined: Jun 09, 2009
Posts: 327
I have two error pages defined thusThe 404 works fine. If I change its location to "/exceptions/error.jsf", that page shows correctly as well. If I for a 500 using "/exceptions/text.html" for the 500 error-page, that also works. But if I try to use a JSP or a JSF for the 500 - nothing. I am lucky if I get the default page.

Is there some limitation with Tomcat that it cannot cope with JSP/JSFs in certain cases?


SCJP6
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15959
    
  19

JSP's not so much, but JSF's work on running a request through the FacesServlet, so things like error and container-supplied login pages don't work under JSF. The internally-synthesized request isn't complete enough for that. Struts has the same issue.


Customer surveys are for companies who didn't pay proper attention to begin with.
Jason Irwin
Ranch Hand

Joined: Jun 09, 2009
Posts: 327
Cool - thought it was just me missing something simple. I'll knock up a simple html page and use that instead.

Thanks!
Kavita Tipnis
Ranch Hand

Joined: Sep 21, 2008
Posts: 177
Finally, Tim answered the question , I had been pondering on this as a sandbox project for months.
I gave up when no one answered it last time I posted on the ranch
I simply created a jsp page and any exceptions of the type java.lang.throwable get redirected to the jsp page.
 
 
subject: Tomcat ignoring 500 error-page
 
Similar Threads
Tomcat cant recognize "error-page" tag in web.xml
Filter Error Page
Displaying a Default Error page
A recursive error was detected.
error page under WEB-INF