• 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
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

error pages in web.xml

 
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all:
I am trying to add error handling in my web.xml file.
here is the code:
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/errorPage.jsp</location>
</error-page>
It is not working correctly. It catchs Exceptions, but not RuntimeExceptions.
I had to add another code:
<error-page>
<exception-type>java.lang.RuntimeException</exception-type>
<location>/errorPage.jsp</location>
</error-page>
RuntimeExeption exteds Exception. Shouldn't be cought without adding the second code.
thanks
 
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RuntimeException, or a class derived from it, is different from other subclasses of Exception in that it is an UncheckedException.
 
reply
    Bookmark Topic Watch Topic
  • New Topic