I think you can acheive this by setting the error-page element in the
web.xml file for the web application.
I am attaching a snippet from the servlets 2.2 api specs section 13.2 DTD,
page 67.
<snippet>
<!--
The error-page element contains a mapping between an error code
or exception type to the path of a resource in the web application
-->
<!ELEMENT error-page ((error-code | exception-type), location)>
<!--
The error-code contains an HTTP error code, ex: 404
-->
<!ELEMENT error-code (#PCDATA)>
<!--
The exception type contains a fully qualified class name of a
Java exception type.
-->
<!ELEMENT exception-type (#PCDATA)>
<!--
The location element contains the location of the resource in the
web application
-->
</snippet>
regds,
Gokul
----- Original Message -----
From: "kavitha ramasamy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 23, 2000 10:54 PM
Subject: [SERVLET-INTEREST] Error page in servlet.
> Hello,
>
> In JSP, if any error occurs, instead of showing that page, we can
dispaly
> the customized user error page like
> errorPage="Error.jsp"
>
> How to implement the same in servlet without using trycatch for unknown
> errors and exceptions.
>
> Kavitha
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html