forward action in your
JSP is converted into a RequestDispatcher.forward() in the translated
servlet.
sendRedirect and RequestDispatcher.forward() are different in the following ways:
Send redirect sends the response to the client with redirect header(i dont know the exact name) which has information about which url to resend request to, to get the actual response. So it involves a round trip. client request->send redicret response->client resends request->response.Forward, on the other hand, handles the forwarding of the request entirely on the server side. The client doesnt even come to know that the reponse was generated by some resource other than the one it had asked the response from.So, the URL in the browser's address bar changes in case of sendRedirect but doesnt change in case of forward.Since sendRedirect forces the client to send a new request to the specified url, you cannot share request scope attributes between servlets if you are using sendRedirect. In case of foward, the request object remains the same which allows u to set some attributes in the request before forwarding it and retrieve them in the forwarded servlet/jsp.