jQuery in Action, 3rd edition
The moose likes JSP and the fly likes Error Handling in Jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Error Handling in Jsp" Watch "Error Handling in Jsp" New topic

Error Handling in Jsp

Keynes Paul Paul

Joined: Feb 18, 2008
Posts: 11
Hi ,

#1 .
I am trying to handle the HTML error based on error codes.I tried to use the <error-page> tag in web.xml as I need to implement the error handling for all the jsp pages, but for some reason even when the HTML error happens the control is not passed over to the error page mentioned in <error-page>.
#2. I am using the jsp headers for error handling.
<%@page errorPage ="/errorPage.jsp"%>
in all the pages that where I need to handle the HTML errors. but same here,the control is not passed to the error handling page.

Also ,
As we know that we can handle the exception object in the errorHandling page, is there a possiblity to handle errors as how we handle exceptions.Kindly help.

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Are you using IE ? Make sure to turn off the Show Friendly Messages option.

[My Blog]
All roads lead to JavaRanch
Keynes Paul Paul

Joined: Feb 18, 2008
Posts: 11
Thanks for your reply, I tried it with the friendly messages turned off, and it worked ,but instead of a regular html error page, is there a possibility to configure a pop-up instead of the html page. Kindly advise.

I agree. Here's the link: http://aspose.com/file-tools
subject: Error Handling in Jsp
It's not a secret anymore!