You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Pramod Jain <pr...@indent.org> on 2004/04/08 18:10:30 UTC

Getting a list of logged in users

We are trying to get a list of all the users that have logged in.  Is there an easy way to do this?

I have seen message  http://www.mail-archive.com/jetspeed-user@jakarta.apache.org/msg08816.html and others in the thread that
suggest creating a table and updating the table when user logs in and out.  This will not work if the user does not click on logout
but closes the window--in our case this happens more than 50% of the time.

We are thinking of using inefficient methods like: body onload and body onunload in topLoggedIn.jsp ... output gets redirected to
hidden iframes etc. We are looking for better ways to "robustly" keep track of logged in users.  Any input would be appreciated

thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: Getting a list of logged in users

Posted by Georg Filios <ge...@filios.de>.
your idea should work, as long as you are interested in the number of  
open Session, which should be equal to loggined users.
If your user leaves the portal without any notice, the session should  
invalidate.

So if you login, create an Object implementing the  
HttpSessionBindingListener (see the servlet api)

Any object implementing this interface, will have his valueBond(..)  
method beeing invoked if put in the session
und his valueUnbound(..) method invoked if remived from the session.

So inside of this methods, you can register/unregister your user , a  
user count or whatever, by making a table entry or better(i.e faster)  
register to a context object.

I did this on a project for a non-jetspeed portal, and worked very  
fine, for statistics...

  regards,

Am 08.04.2004 um 18:10 schrieb Pramod Jain:

> We are trying to get a list of all the users that have logged in.  Is  
> there an easy way to do this?
>
> I have seen message   
> http://www.mail-archive.com/jetspeed-user@jakarta.apache.org/ 
> msg08816.html and others in the thread that
> suggest creating a table and updating the table when user logs in and  
> out.  This will not work if the user does not click on logout
> but closes the window--in our case this happens more than 50% of the  
> time.
>
> We are thinking of using inefficient methods like: body onload and  
> body onunload in topLoggedIn.jsp ... output gets redirected to
> hidden iframes etc. We are looking for better ways to "robustly" keep  
> track of logged in users.  Any input would be appreciated
>
> thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org