What is the exact difference between forward and sendredirect. As far
as I could search, forward means calling another servlet/jsp from a
servlet/jsp , and redirect means calling the browser to call another
servlet/jsp.
Can anyone explain more clearly.
More importantly, when to use forward and when to use redirect. Which
is better. Are there any pitfalls that either of forward or redirect
get around?
Thanks,
SatishMotwani
steph - 01 Apr 2005 13:28 GMT
doing a redirect causes the request and response objects being lost and the
client making a new http request (with network trafic and latency).
a forward simply call a new servlet passing request and response objects.
from the client point of view, this is the same http request i.e. same url.
if you don't explicitely need a 'redirect' for example for bookmarking, i
suggest you to use forward.
Le 01/04/2005 13:33, HalcyonWild a écrit :
> What is the exact difference between forward and sendredirect. As far
> as I could search, forward means calling another servlet/jsp from a
[quoted text clipped - 7 lines]
> Thanks,
> SatishMotwani

Signature
stephane