Dan,
Servle (1) checks to see if the user already has a session, if not it authorizes the user to get a session. When the proceeds to servlet(2), it will once again check to see if the user already has a session. Since the user was assinged a session in servlet(1), it will just use that session, and not assign a new one. The sevlet itself does not grant sessions, sessions are taken care of by the servlet engine. The servlet simply decides if the user has a session, or requires that one be assigned. All session tracking is taken care of for you by your servlet engine.
 
Hope this helps.
 
John D. McDonald
CipherStream Systems
email: [EMAIL PROTECTED]
web: www.cipherstream.com
-------------------------------------------------------
Secure E-Business Is Our Business
-------------------------------------------------------
----- Original Message -----
From: dan
Sent: Sunday, December 19, 1999 9:52 AM
Subject: session tracking basics...?

Hi,
Neither in the JWS1.1.3 doc nor in Hunter's Servlet Programming nor
in The Developer's Guide to the Java Web Server (Woods/Pekowsky/Snee)
is it explicitly stated that a site consisting of *several* servlets needs or
doesn't need e.g.
HttpSession session = req.getSession(true);
for every single servlet.
 
If I client hit ServletOne (with a
HttpSession session = req.getSession(true);) and then navigates to
ServletTwo (also with a
HttpSession session = req.getSession(true);)
is the first ID persistent through ServletTwo and so on...
or is a new ID created for ServletTwo, ServletThree respectively?
-dan

Reply via email to