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 12:45:09 GMT
As a rule of thumb... Normal workflow would use a forward. Abnormal
workflow, such as session timeouts requiring the user to be passed back to
the login page, or notification of moved pages where you want the user to
rebookmark would be redirects.

Redirects are slower because of the extra round-trip and as others have said
cause request-scode parameters and variables to be lost. So use them only
when you need to.

-----Original Message-----
From: Kommineni, Sateesh (GE Consumer & Industrial)
[mailto:sateesh.kommineni@ge.com] 
Sent: 15 April 2004 13:40
To: Struts Users Mailing List
Subject: RE: what is the difference between forward and redirect?


Hi,

   when you use redirect , what ever data you have stored in the request
will no longer be available as you are making a new request. where as if you
use forward the request scope will be continued and all the objects you
stored in the request will be available..

-Sateesh



-----Original Message-----
From: Johannes Wolfgang Woger [mailto:jwwoger@chello.at]
Sent: Thursday, April 15, 2004 5:57 PM
To: Struts Users Mailing List
Subject: Re: what is the difference between forward and redirect?


Hi,
I basically understood the technical diffence between forward and redirect,
but from webapplications point of view, when do I use forward or redirect.

On which circumstances should I use a redirect for example?

Wolfgang

Sanoj, Antony (IE10) wrote:

>Mike,
> 
>  forward is carried inside the servlet engine, whereas the redirect 
>goes to the browser, and then the browser sends the request to the 
>resource
>  forward preserves the request state, but redirect destroys the original
>request as it completes a request/response cycle 
>  when the browser receives the redirect.
>regards
>Sanoj
>
>-----Original Message-----
>From: Mu Mike [mailto:mikemu_58@hotmail.com]
>Sent: Thursday, April 15, 2004 3:00 PM
>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
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>  
>


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


---------------------------------------------------------------------
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