Difference between forward(request,response) and SendRedirect(url) in Servlet?

With Forward, request & response would be passed to the destination URL which should be relative means that the destination URL shud be within a servlet context). Also, after executing forward method, the control will return back to the same method from where the forward method was called. All the opposite to the above points apply to sendRedirect.
(OR)The forward will redirect in the application server itself. It does not come to the client. whereas Response.sendredirect() will come to the client and go back ...ie. URL appending will happen.

Showing Answers 1 - 2 of 2 Answers

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