Hi Satheesh,
First, please avoid all caps in your mail. It is called "Shouting".
Now to the original problem,
Cookies are used by Server side resources to store data about the client.
Servlets also use cookies to achieve session management. When a server wishes
to set a cookie on a client, it needs to pass the cookie as a part of a HTTP
Header called Cookie
For example when an app server wants to set a session cookie on to a client ,
it adds a header in the response. As in:
Set-Cookie: JSESSIONID=EGLFKMNGIBHK; Path=/
Where JSESSIONID is the name of the Cookie , EGLF.. is its value and Path
specifies the request paths on this server for which the client is to return
this cookie.
Now when the client accepts this cookie , it is expected to return this
cookie to the server for every request that begins with Path ( in this case
/) It does so by adding this line as a part if the HTTPheader in each request
cookie: JSESSIONID=EGLFKMNGIBHK;
HOpe this gets you started on figuring out the rest .
Cheers
Mano
-----Original Message-----
From: Satheesh Naidu [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 20, 2001 3:39 AM
To: [EMAIL PROTECTED]
Subject: HOW COOKIES FUNCTION?
Hi friends,
Can anybody explain me how the cookies are implemented in a
Servlet container.
what about the browser support/role.
I am using Tomcat as Servlet container.
My intention is to know how it is implemented in the container/browser.
I have following doubts,
1. When a new cookie is created , how server intimates to client.
I was expecting that the container will insert something like below in
the HTML file.
<META HTTP-EQUIV="SET_COOKIE"
CONTENT="cookiename=AKGF65THVGH;path=/;expires=Thur,18-Jan-2001 12:00:00
GMT">
But When I checked in client browser(through view source) I did not see
anything like that.
Is there any other way?
2. When client sends back the cookie value to server, how it will do this?
I was under the impression that it will go as part of GET request.
Please somebody can help me.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html