tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Ron <da...@bandmerch.com>
Subject Re: Multiple browser windows sharing the same session - dirty hack solution
Date Thu, 11 May 2006 15:53:43 GMT
I think that you first have to define what you mean when you say, 
"logged in".  When a person closes the browser window, have they logged 
out?  How does Tomcat know this?  Or, does the logout occur when the 
session is garbage collected?

So, without knowing what "logged in" really means, how can you know if a 
person is actually logged in or not?

--David Ron

Peter Hubbard wrote:

>Quite simply, if you have already logged in to the system, you get
>kicked out until later. Like so:
>
>HttpSession session = request.getSession(true);
>                
>if (session.getAttribute("details")!=null)
>{
>     log.warn("Already logged in.");
>     redirect="/errors/alreadyloggedin.jsp";
>}
>else
>{
>     session.setAttribute("details", client);                
>     redirect = "/portal/portal.jsp";
>} 
>
>
>This gets me out of the problem of multiple logins through the same
>browser window (Firefox and Opera) or the same PC (IE) having their
>session information confused.
>
>I've not found any other ways around this problem, or solutions of how
>to allow individual browser windows and tabs to have individual session
>data. Is there a real solution for this, and if so could some kind soul
>please point me in the right direction?
>
>Thanks
>
>  
>

-- 
David Ron
IT Director - BandMerch
5126 Clareton Drive #140
Agoura Hills, CA 91301
877-502-3728 x5201
David@BandMerch.com



Mime
View raw message