Sunday, March 30, 2003 07:14 PM
Doing an HTTP redirect requires a round-trip to the client. If this is not required, and the only desire is to forward the request to another resource, then this can be much more efficiently accomplished with the RequestDispatcher
. Additionally, when using the dispatcher the state of the request object is maintained between resources, which will not be the case with the HTTP redirect.
When using the RequestDispatcher, you will not be able to change the URL in yor browser. This is because your handling page and the forwarded page share the same request. If you want the browser URL to change, sendRedirect is the one to use.