struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mike.ra...@barclayscapital.com
Subject RE: what is the difference between forward and redirect?
Date Thu, 15 Apr 2004 09:55:25 GMT
The main difference is that the forward takes place on the server, whereas
the redirect results in another HTTP request from the client. A forward is
therefore invisible to the client, whereas the redirect is something they
would see.

Example 1: user types in http://myserver.com/page1
/page1 forwards to /page2

User still thinks they are seeing http://myserver.com/page1

Example 2: user types in http://myserver.com/page1
/page1 sends redirect to /page2
Client then requests /page2

A browser would then show http://myserver.com/page2 in the address bar


-----Original Message-----
From: Mu Mike [mailto:mikemu_58@hotmail.com] 
Sent: 15 April 2004 10:30
To: user@struts.apache.org
Subject: what is the difference between forward and redirect?


when forward, what do we foward? 
when redirect, what we do different?

Thanks&Regards
Mike

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message