>>> Robert Pimentel <[EMAIL PROTECTED]> 9/10/99 2:57:59 PM >>>
>Would someone be able to provide a URL that might explain how
servlets
>maintain state?

Check the Sun archive of this list:
http://archives.java.sun.com/archives/servlet-interest.html

>Please correct me if I'm wrong..

> 1. A servlet is run in a single process..regardless
>of the # of requests made

No, not really. A servlet engine runs in a single process but handles
http connections with multiple threads.

Each thread calls the servlet corresponding to the path in the http
request.

> 2.Those requests are handled concurrently

by the threads yes.

> 3. Servlet stays in memory between requests

right again.

>Is all the state information automatically stored on the server
side?

Not quite, there is a session identifier (or session-id) which must
be passed back to the client.

>Are Session Id's/Cookies only used to associate a particular session
with a
>particular user?

No, session-id's are used to identify a session.

>When we use the word 'Session Object', what exactly does that mean?

The session object is the object which represents the session.


Think of the session manager as a hashtable.

Each object in the hashtable is a session.

A session-id is the string-key for the hashtable.

When a request is made the servlet can see if the request is
associated with a session and look up the session object based on the
key.

The session object is also basically a hashtable, but this servlet
can put anything it wants in it, keyed by whatever it wants.


The servlet engine handles the business of making sure an http
response from a servlet includes the session identifier in some way
(most usually as a cookie) so that the client will return the session
identifier with the next call and allow the servlet to pick up the
session again.


This is a very cursory explanation. Hope it helps.


Nic

___________________________________________________________________________
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