oh Thank you very very much.
You cleared many of my questions & doubts.
Now my concepts are getting cleared.


What i understood from your explanation is

        HttpSession     session = reqp.getSession(true);
        count   = (Integer)session.getValue("track.count");

By the above command i create a session and a variable track.count
its a kind of counter.
What happens to the session and variable once the user logs out.
Does it going to die or if again some one logs it is going to use the
previously stored
value for the variable.
OR
One has to manually invalidate the session and variable before he logs out.
I want to understand the scope and availability of the session.

I really appreciate  taking so much pain to explain me these
Thank you
srikanth

-----Original Message-----
From: Craig McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 14, 1999 1:58 PM
To: [EMAIL PROTECTED]
Subject: Re: Same session


"PATIBANDA, SRIKANTH" wrote:

> I didnt understand clearly what u r tyring to tell.
> But i did tried logging twice by opening fresh browser everytime.
> As u said its creating a new session_id but i am logging with same
> user_name.
> If it is the same user_name isn't supposed to give me same session-id.
> or
> may be iam not understanding the concept of sessions.
>

Sessions and user authentication are two totally different concepts -- in
fact,
you can use sessions for all sorts of stuff without requiring a login at
all.
If you're using cookies for session ID maintenance, it can be totally
invisible
to the user as well.

Let's look at a couple of analogies to help explore the differences:

* On an OS like Unix or NT, it is quite possible to log in
  multiple times under the same username.  Each connection
  to the server is separate, just like sessions are separate.
  You can do independent things that don't interfere with each
  other (unless you do so on purpose).  In the servlet/JSP
  world, sessions are used to maintain the independent state
  information about each login.

* Now think about the installation of a typical Windows program
  based on something like InstallShield.  You are walked through
  a "wizard" application that asks you a few questions at a time,
  but you can always go back to the previous page to modify one of
  those answers.  In the servlet/JSP world you can implement
  wizard-type applications quite easily, by maintaining the previous
  answers in the user variables of a session -- even if you did not
  ask the user to "log in" with a username/password.

In grossly simplistic terms, usernames are "static" things -- used to
identify a
particular individual and (in conjunction with a password) prove to the
system
that you are authorized to use it.  It is only one individual, even if they
are
doing more than one interaction with the system at the same time.

Sessions are more "dynamic" things -- a particular individual is using the
system at a particular time to do a particular interaction with the system
that
typically involves more than one page.

>
> thankyou
> srikanth patibanda
>

Craig McClanahan

___________________________________________________________________________
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