Please correct me if am wrong in understanding this concept.
============================================================

If u have yahoo.com u have a servlet running on it and it has a cookie and
its name is "yahoo" and if u have nearly 10 session for yahoo alone then u
willget different ids but the session name is the same.  If u r accessing
the netscape then u will get a cookie called "netscape" and if ucreate 10
different sessions for netscape then u willget 10 different cookie id for
the same cookie "netscape" but the name is the same.  When u say
req.getCookies then all the cookies including that of "yahoo" "netscape"
will be reproduced u need to get what cookie ur accessing with.

if so, how shall i get the current cookie i will assign a cookie to a
browser and a session and if i move toanother url or another browser then
how shall i know what is the current cookie name for the current session.

Please helpme to understand this concept.


On Sat, 31 Jul 1999, Hans Bergsten wrote:

> "Srinivasan S (Systems Engineering Group)" wrote:
> >
> > Hi team,
> >
> >         Same old doubt which a kid will ask when he starts learning
> > session tracking.  I have a servlet running on my server and a client
> > access that page the cookie name is "cooks" for session A and another
> > client access the same server say session B what name will it be given to
> > session B if the same "cooks" then for a single servlet all the cookie
> > name is equal.  If so, how a session tracking is implemented, please help
> > me i have read jason hunters book still i have this doubt get uncleared.
>
> The cookie *name* is the same for all sessions (usually something like
> "sessionid" with a prefix identifying the servlet engine), but the cookie
> *value* is unique per session. The servlet engine generates a new unique
> session ID when a session is created, usually some combination of time,
> a counter and the servers IP address. It uses this ID as the cookie
> value. So when the client sends the cookie back to the server with the
> next request it can associate the request with the correct session.
>
> --
> Hans Bergsten           [EMAIL PROTECTED]
> Gefion Software         http://www.gefionsoftware.com
>
> ___________________________________________________________________________
> 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

Reply via email to