HI Susan,
           See reply below

Regards,
Jiger


>From: Susan Kundu <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
>        Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: regarding session
>Date: Fri, 18 Aug 2000 15:22:22 +0530
>
>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.


Yes there is a neat trick. What u do is create an Applet in your web page. &
when the user closes his Browser window. Its destroy() method is called. So
in this method just call a Servlet say LogoffServlet which invalidates this
users session from the Context or whatever your logics is. Now the User is
Free!!. So he can rightfully login from another Place.

Bye
Jiger



>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

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

___________________________________________________________________________
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