File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error handling in web.xml

 
Hanna Habashy
Ranch Hand
Posts: 532
  • 0
  • Mark post as helpful
  • send pies
  • 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 catch 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
 
Leandro Oliveira
Ranch Hand
Posts: 298
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!! I'm using tomcat 5.0 and it works!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic