Re: How to specify an Error Page in a servlet

Tim Davidson <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <A25F56EE7570A24AA562C254BB4E89150B1A55@ghc-w2k1>
Only way to do it is

doGet(...)
{
        try {
        ....
        // do everything in here
        ....
        }
        catch(Throwable t)
        {
                response.sendRedirect("/jsp/ErrorPage.jsp");
        }
}
-----Original Message-----
From: Emmanuel Eze [mailto:[email protected]]
Sent: Wednesday, June 25, 2003 3:35 PM
To: [email protected]
Subject: How to specify an Error Page in a servlet


Hi all,

Can someone please tell me how to specify an Error Page in a servlet similar
to JSP's errorPage attribute of the page tag.

<%@ page language="java" buffer="8kb" autoFlush="true" isThreadSafe="true"
isErrorPage="false" errorPage="ErrorPage.jsp" %>.


Thanks

___________________________________________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.