I have studied about sendRedirect() method and i got some point like -
If client send a request, it goes to server or container. Container calls the servlet but this servlet is unable to handle the request. so, it send the request to different servlet using sendRedirect method. This response goes to browser with status code so, browser see the status code and create a new request with new URL and send to the container for the request. So, all this thing happen internally. Client does not know what is going internally. Client see the proper output only.
i understood this thing only. so it is right and wrong.
When forward is used we can pass data to the forwarded jsp/servlet using request.setAttribute() as the same request and response objects available the forwarded servlet/jsp. But using sendRedirect() we have to set the data in session or by appending the data to the URL that will be passed as argument to this method, because by calling this method a new request is created.
The forward() request is transparent to the user. It is done at server side and it is not visible to user.
The sendRedirect is not transparent to the user, if request is sendRedirect then its visible in your browser (redirect at client side).
The forward() method is faster than using sendRedirect as no network round trip to the server and back is required.