Say a browser requests page "A" in an application.

If the application responds by forwarding to "B", then a 
server-side forward takes place; the server sends back the 
contents of "B" but the browser doesn't know the difference. It 
asked for "A" and got something back that happened to actually 
be "B".

If the applications responds by redirecting to "B", then the 
server sends back a message saying "please ask me for B". The 
browser then requests "B" and gets it.

Either way it gets the same thing, but the mechanism is quite different.

A redirect obviously involves some more overhead to get from A 
to B, so to speak. You generally don't need to redirect.

An example of when you need redirect that comes to mind is when 
you want to forward to a URL on another server... you can't do a 
server-side forward in that case.

Sean


On Thursday, January 24, 2002, at 03:46  PM, Brian Holzer wrote:

> Hey there,
>     I am kind of confused about what the difference is between 
> a forward and a redirect.  In reading the documentation on the 
> logic:forward and redirect tags. With the forward tag, whether 
> a forward or redirect is sent, is determined by the redirect 
> param in the <action> definition. The redirect tag sends a 
> redirect to the browser, but what is the difference between the 
> two?  Why would I want to define an Actions forward so that it 
> is sent as a redirect?  Maybe the answer will be evident to me 
> once I know the difference b/t the two.  Can someone shed some 
> light on this for me?
>
> Brian
>
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:struts-user-
> [EMAIL PROTECTED]>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to