What is the different between session and cookies? Where is the session information stored? In RAM of the Client or Disk of the Client or it is stored on the server?
Session maintains the client state on server side Cookie maintains the client state on client side. Servlet sends the session id to the client through cookie.
well the purpose of session and cookie is the same --- to maintain the state [in a typical web application based on http protocol]
Session -- Its stored at server side [containers memory RAM] and usually the amount of data stored is more when compared to a cookie. Besides this no-one from client side can manually disable/manipulate session.
Cookie -- Its stored at the clients hard-disk and the user has the complete authority to enable/disable it one can also open a cookie file and make manipulations [but then im not sure how useful it could be for a person:) ]