• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt in cookies ?

 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
i have some doubt about cookie.Actually as addCookie method take name value pair we give some name to cookie and that name is same for all the client so here how can cookies will be identify i mean how can cookie know that client is from so and so computer and his information is these?please help
 
Vijitha Kumara
Bartender
Posts: 3952
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lokesh pattajoshi wrote:... so here how can cookies will be identify i mean how can cookie know that client is from so and so computer and his information is these?

Each Cookie information (set by the response) is sent by the browser with each request to the server. JSESSIONID (cookie or the appended value to the URL) is used to identify a particular client within the server.
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lokesh, when a cookie is created it gets a unique ID, this ID is set by the container. Whenever the browser sends a request it sends the cookie ID, then the server checks the ID and recognizes the client.
 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vijitha thanks for your replay . Can you please tell me how this session id is created ?
 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anusha thanks for your valuable replay . Then according to you container is taking care of all the things to recognize the client system ?is container is using request and response header for passing the necessary info ?
 
Vijitha Kumara
Bartender
Posts: 3952
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lokesh pattajoshi wrote:... Can you please tell me how this session id is created ?

It's created by the web container whenever we ask the container to create session for the client and completely managed by the container.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!