Hi,
If you use the servletContext.setAttribute() to store the HttpSession object
in place of the session id with the user name then I think you can call the
invalidate() method on the HttpSession object to invalidate the previous
session.
hope this helps,
If anyone else has a better strategy to achieve this, please let us know.
regds,
Gokul
www.wipro.com
> thanks for the reply. now theres another problem.
> if a user is logging in for the first time, i am storing his name and
> session id in the servletContext using setAttribute(). so if the same user
> tries to log in from some other client, it will check if its name is
> present in the servletcontext using getAttribute(). this way double logon
> can be prevented. but lets say the user closes the browser window
directly,
> the servletcontext still has its name and session id stored and now that
> user wont be able to login again even though he has closed his window. for
> this if it is possible that when the user tries to login from some other
> client instead of denying access to him for the second time, i invalidate
> the first session login in the previous window and create a fresh session
> for him, it will solve the problem. this was possible earlier when
> getSession method in servletcontext was not deprecated because then we
> could get the previous session from the new one. but now it is not
possible
> to invalidate some other session from outside. is there any work around
for
> this.
> hoping to recieve some solution
> regards
> susan
>
>
___________________________________________________________________________
> 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