• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

configuring error pages in DD

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working with configuring error pages in the DD and I read that it is possible declare an error page for a more specific exception. So I tried the following:



I went ahead and created a jsp to throw a java.lang.ArithmeticException, but everything I end up at the errorPage.jsp. Shouldn't this not be happening? My understanding was that with both of these error pages that any other error besides java.lang.ArithmeticException will go to errorPage.jsp
[ July 26, 2006: Message edited by: Jerret Halter ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've looked at the translated JSP page of Tomcat,
and it catches a Throwable in its _jspService() method and forwards it.
I think that's why you are redirected to the error page associated to Throwable exceptions.

The spec says :
The Web application may have declared error pages using the exceptiontype
element. In this case the container matches the exception type by comparing
the exception thrown with the list of error-page definitions that use the
exception-type element. A match results in the container returning the resource
indicated in the location entry. The closest match in the class heirarchy wins

So even with Throwable declared in web.xml, it should be ok.
I'm confused too. Maybe it's a bad idea to declare the Throwable error handling in web.xml
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's an entry here stating that it works with Sun Java System Application Server 8.1 :
https://coderanch.com/t/171560/java-Web-Component-SCWCD/certification/Catching-exception
 
Jerret Halter
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I am using tomcat 5.5xxx so now I know why its happening.
 
It is an experimental device that will make my mind that most powerful force on earth! More powerful than this tiny ad!
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic