Just keep in mind that the session object is shared by all
servlets running within the same service.  So if you have a user
that is accessing two or servlets in the same web service they
only have one session object.  This is a great way for sharing
Persistent objects (e.g. a client profile, DB Connection, etc.)
where that is desirable.  You need to decide in your case whether
you want to invalidate the session object or to do a
removeValue() on a servlet-specific key value.

Hope this helps.

Tim

Bob Withers wrote:
>
> At 03:13 PM 3/30/99 -0500, you wrote:
> >Hi gang,
> >     I am writing a logout servlet.  Basically when the user is done with
> >processing he/she needs to be logged out. Any pitfalls i should avoid? Help
> >is greatly appreciated..Thanks.
> >
> >Amar..
> >
>
> I wrote one of these and there really ins't much to it.  I just called
> HttpSession.invalidate() and redirected to our login screen.  One thing I
> did run into was that while invalidate() removed all the values attached to
> the session it didn't seem to remove the session.  In other words, after
> calling invalidate() and receiving another GET/POST request from the same
> client HttpSevletRequest.getSession(false) returned a session rather than
> null.  I experienced this under both servletrunner and Jserv.  I had to
> perform an additional check for a session value our login servlet adds to
> insure the session was considered "logged in".
>
> Regards,
> Bob
>
> ___________________________________________________________________________
> 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