Web tier: servlets, JSP, Web frameworks: Difference RequestDispatcher's sendRedirect () And Response's
Any one tell me the diff between RequestDispatcher and Response 's sendRedirect() method?
- Posted by: Amit Gupta
- Posted on: December 19 2002 06:34 EST
- Difference RequestDispatcher's sendRedirect () And Response's by Venugopal Vaireddy on December 19 2002 11:43 EST
- Difference RequestDispatcher's sendRedirect () And Response's by Karthik Arumugham on December 29 2002 13:20 EST
Up to my knowledge RequestDispatcher has 'forward" and include fecilities. which just makes output, it does not make round trip to browser , where as sendredirect goes to browser, comes back as if typed URL there.
I sincerely suggest you read a good servlet/jsp book to get a good grasp on the fundamentals. The answer to the question you had asked could pretty much be found in any mediocre/high-level servlet/jsp books. BTW, One major difference is you save a network round-trip with RequestDispatcher coz the redirection is done internally within the webserver whereas in SendRedirect, communication is sent to the Browser to redirect its request to the new URI location.