Request.sendRedirect sends an HTTP redirection message to the client, due to
which the client agent initiates a new request to the server, asking for the
redirected resource. This scenario therefore includes 2 network calls from
the client to the server and is generally used when the redirection is done
to a resource outside your web server.

dispatcher.forward, on the other hand, redirects the output to a resource
within the server, a process to which the client is unaware of.This scenario
includes one call from the client to the server, which is obviously cheaper.
Besides, performing a forward this way enables the forwarded page to access
all the objects bound to the request scope that were created by the
forwarding page...

zm.


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API
Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Shankar
Sent: Wednesday, February 27, 2002 6:51 AM
To: [EMAIL PROTECTED]
Subject: Re: difference between resuestdispatcher.forward and
resposne.sendRedirect


They are used in different contexts altogether
Shankar
----- Original Message -----
From: "Sudarson Roy Pratihar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 27, 2002 8:34 AM
Subject: difference between resuestdispatcher.forward and
resposne.sendRedirect


Hi All,

Can any anyone pls tell which one is better in performance -

resuestdispatcher.forward or resposne.sendRedirect?
Thanks and Regards,
Sudarson

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html


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


___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to