What is the getOnbytes() method .what is the difference betweeen sendRedirect() and requestDispatcher().

Questions by manipalreddy.s

Showing Answers 1 - 1 of 1 Answers

bibhu

  • Mar 9th, 2007
 

RequestDispatcher is used to redirect a request on the server side.
It is used in the follwing way:
getrequestdispatcher().forward() : forwards to a resource ie the control for the request and the response are with the forwarded resource.
getrequestdispatcher().include() : include the specified resource. The control still lies with the resource thet calls the include method.

sendRedirect is called for a redirection by the browsers. A status code of 302 is neede for the send redirect to work

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions