1) forward() is a server-side redirect. url on the browser doesn't change. 2) sendRedirect() happens on the client-side i.e server sends a redirect url to a client status of http 301 and the url on the browser changes to the redirected value.
forward() method of RequestDispatcher is a server side activity. So the request and its associated session are available to the forwarded resource.This method is normally used for sending a request and response object to resources (servlets or JSP's)which are in the same ServletContext.
sendRedirect() method of a response object sends the url(parameter of sendRedirect() method) to the browser and the browser sends a new request to that url. sendRedirect() used to forward requests to a resource which is outside of the current web application. It is like ,opening a new browser and type your url.
correct me if i am wrong.
God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda