File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSF
Bookmark "Tomcat ignoring 500 error-page" Watch "Tomcat ignoring 500 error-page" New topic

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?

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

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.

An IDE is no substitute for an Intelligent Developer.
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.

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.
I agree. Here's the link:
subject: Tomcat ignoring 500 error-page
It's not a secret anymore!