Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is a cookie in java ?

 
siva chaitanya
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain me with an example i am searching on google but i cant able to get the right answer.
 
jatan bhavsar
Ranch Hand
Posts: 299
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Refer this Thread.

Jatan
 
siva chaitanya
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the reply but cookie and session both are used to store information apart cookie is stored at client side whereas session is stored at server side but my question is what information we store in cookie and what information we store in session?
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typically the server-side session is used to store the state of user interactions on a website, for example shopping cart data. The server-side session is identified by a unique id (JSESSIONID), which is typically stored in a client-side session cookie. Unless the browser doesn't support cookies, in which case it ends up the URL. There are many other uses for client-side cookies though, but session tracking is one of the most common.
 
Sabarish Venkat
Ranch Hand
Posts: 136
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For your better understanding, Say if you are logging into a mail account , Once you provide the username and password the data will reach the mail server as a response it sends an information like identification of your IP, date time so on all these will be stored in the cookie with the Unique id given to you. this (cookie file) can be viewed in your system too.

on other part session is like say after you logged in you might see your username across different pages like inbox, sent items, trash so on here your username will maintained by the session until you sign out This is called session

Hope you understood now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic