> I have a problem regarding the sessions. I am getting a session using
> getSession(true) in the servlet which takes care of the Logging in
> functionality . Also I am storing the following things in two hashtables
>
> Hashtable 1 :   userid , login time
> HashTable2 :   userid  , sessionid( getting it using the getId()).
>  I have a controller servlet in which  a thread is started  in init() to
> keep track of max logged time using the first hashtable . I log the user
out

I do not know why you want to create a thread in your servlet. A servlet
container is a controlled runtime with the container managing
instantitiaion and threads for requests. Explicit threading may conflict
with the container.

I suggest that you've a relook at your design. Your design does not seem
to be sensitive to the specification.

> in a method in the controller servlet calling it from the thread's run()
> implemantation.
>
> Now my problem is to invalidate the session the for the logged out user(
one
> session allowed per user) using the sessionid  stored in the second
> hashtable at the time of getting the session.

You should use the <get/set>MaxInactiveInterval of HttpSession to let
the container invalidate the sessions for you.

Hopefully, by changing the design, you'll not have the above
requirement.

Cheers!

___________________________________________________________________________
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
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup

___________________________________________________________________________
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