Can you please explain to me how to use RequestDispatcher.forward()

Regards,

Yuval
Domain The Net Technologies Ltd.
6 Weitzman Blvd.
Ramat-Hasharon
Israel 47211
Tel: 972-3-5474443
Fax: 972-3-5474446
www.DomainTheNet.com

"This email message and any attachments hereto are intended only for use by
the addressee(s) named above, and may contain legally privileged and/or
confidential information. If you are not the intended addressee, you are
hereby kindly notified that any dissemination, distribution or copying of
this email and any attachments hereto is strictly prohibited. If you have
received this email in error, kindly delete it from your computer system,
and notify us at the telephone number or email address appearing above.
Thank you"



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Craig R. McClanahan
Sent: Thursday, August 23, 2001 22:47
To: Tomcat-User (E-mail); [EMAIL PROTECTED]
Subject: Re: Redirect page after catching exception




On Thu, 23 Aug 2001, Yuval wrote:

> Date: Thu, 23 Aug 2001 23:39:05 +0200
> From: Yuval <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED], [EMAIL PROTECTED]
> To: "Tomcat-User (E-mail)" <[EMAIL PROTECTED]>
> Subject: Redirect page after catching exception
>
> Hi,
>
> can someone help we with how to stop the servlet after catching exception
> and redirect the page to error page?
>

It's not clear exactly what you mean.

If your servlet *catches* an exception, then the error page mechanism
provided by the container does not get involved at all.  You can use the
usual technique (RequestDispatcher.forward()) to forward control to an
error reporting page if you want.

The <error-page> declaration in web.xml is only invoked when your servlet
or JSP page *throws* an uncaught exception.

> Regards,
>
> Yuval

Craig


Reply via email to