Follow the standard servlet spec / api:

request.sendRedirect("http://www.yahoo.com";);

Keep in mind that this will fail if the response has already
been 'committed' (e.g. some data has been sent to the client).
The reason is that a 'redirect' requires that certain HTTP header
values be returned to the caller. If the headers have already been
sent, then the protocol prevents you from redirecting.

Good Luck

Tom Drake

----- Original Message ----- 
From: "Xin Li" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, January 09, 2002 1:25 PM
Subject: help is needed -- question on page redirect


| I have a question on Page Redirect in Tomcat4.
| 
| In enhydra the page redirecting is accomplished by using "throw new
| ClientPageRedirectException (NextPage);" May I know what's the equivalent
| method of redirecting in tomcat?
| 
| Thanks
| 
| 
| --
| To unsubscribe:   <mailto:[EMAIL PROTECTED]>
| For additional commands: <mailto:[EMAIL PROTECTED]>
| Troubles with the list: <mailto:[EMAIL PROTECTED]>
| 
| 
| 


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to