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.
-
Interview Candidate
- Dec 18th, 2003
- 2
- 3708
Showing Answers 1 - 2 of 2 Answers
Related Answered Questions
Related Open Questions
Difference between forward(request,response) and SendRedirect(url) in Servlet?
(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.
Related Answered Questions
Related Open Questions