• Post Reply Bookmark Topic Watch Topic
  • New Topic

error page for runtime exceptions  RSS feed

 
manish ahuja
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

In our current project we have decided to follow a practice of rendering all runtime exceptions as it as to say GenericError.jsp page which just prints out the exception as it is. In the web.xml of our webapp i m specifying something like this
--------
<error-page>
<exception-type>java.lang.RuntimeException</exception-type>
<location>/GenericError.jsp</location>
</error-page>
--------
For checked exceptions we plan to handle teh exception slightly in a different manner hence in the exception-type I m not specifying java.lang.Exception.

Do let me know if this is fine.
Also I would want to know if all Runtime exceptions scenarios will be redirected to this page automatically. Do I also need to specify the error page attribute in each of jsp files of my application.

Regards,
 
Yogendra Joshi
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manish ,

The application handling is quite flexible and you need not specify error page attribute in each of the JSP's if it is already defined in the DD. i.e web.xml file.

For checked exceptions , Its fine if you are not doing it through web.xml.

Let us know if you have any further queries.

Regards ,

Yogendra N Joshi.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!