What is the difference between Dispatching a request and Forwarding a request?

Questions by enjoy

Showing Answers 1 - 4 of 4 Answers

dile_sahoo

  • Mar 17th, 2007
 

In case of the Dispatching a request we can use the relative path.Incase of Forwarding a request it internally execute the RequestDispathcher.forward() and forward() method cannot be used to dispatch the request to the multiple request.If forward() is used to dispaly the request,the output generated by the calling servlet will be discarded,In this case the output tthat is generated by the called servelt will be send to the client.

  Was this answer useful?  Yes

santh kumar

  • Mar 20th, 2007
 


 it's an additional information to sahoo's answer only.

 RequestDispacher is an Interface ,it provides two methods.

 forward() and include()

Precisely to this context, container can forward the request to with the context root or domain only. when request is forwarded to someother servelt ,it will take responsibility to send the response to the client.

  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