Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat ignoring 500 error-page

 
Jason Irwin
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18003
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jason Irwin
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic