>So, I *do not* need to create a session ? (Because the session is
>automatically created on the first time request is accepted by the web
>server ? But at this point, the user *is not joined* to the session ?)
>So, how to explicitly *join* a user to a session ? (Until the user join
>the session, session.isNew() always returns true ?)
Raka,
Here's how it goes: suppose you have 2 servlets, Servlet1 and Servlet2. If
the user first gets Servlet1, the request-parameter in the doGet (or doPost
etc) contains a HttpSession, which you can get by calling
'request.getSession ()'. Since it's the first servlet the user hits on your
page, this session is new (isNew () returns true). If that same user now
goes to another servlet on your site, say Servlet2, and again you call
'request.getSession ()' (in Servlet2), the returned HttpSession is not new.
Simply because it's the second servlet the user hits on your page. So there
is no need to explicitly join a user to a session.
Did you receive the e-mail I send you to your personal e-mail address a few
days ago? It contained two examples of what is said above.
Arjan Houtman
Antares Informatisering
[EMAIL PROTECTED]
___________________________________________________________________________
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