File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cookies

 
Raj Jindal
Ranch Hand
Posts: 50
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does cookies keep track of session or
cookies help in keeping track of sessions ?
Does HttpSession internally use cookies ? If yes then why ?
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by raj jindal:
Does cookies keep track of session or
cookies help in keeping track of sessions ?

Cookies are used by web servers to keep track of individual sessions. They are small text files the web server can store on the client and request back, usually containg a unique id and sometimes some other client information. The same effect can be gained by "URL Rewriting" in which the server rewrites all the links on a page it is serving to contain a unique ID.

Does HttpSession internally use cookies ? If yes then why ?

A servlet container (web server) will use one of the above methods to track sessions. This process is abstracted by the HttpSession class.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic