Hello Ashok,
With Forward, request & response would be passed to the destination URL, which should be relative (means that the destination URL should be within a
servlet context.
RequestDispatcher rd=getServletContext().getNamedDispatcher("HelloServlet");
rd.forward(request,response); ).
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 ...i.e. URL appending will happen.
You can't call sendRedirect() after calling forward(). Once the forward completes, the response is closed. You can't call any method which sets headers or writes output to the server.
Hope this info is helpful.