You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gustavo Felisberto <gu...@wit-software.com> on 2010/01/12 18:09:19 UTC

[S2] Iterate over sessions

Hello All,

 

I have a Web application where I handle the logged in status with some
variable in the session. I have some actions for the Administrator where we
can control if a particular user account is locked or not. My problem is
that if a user loges in and after that the admin locks the account the user
can continue to use the application until he logs out and tries to login
again.

 

I did not want to have to go to the database each time the user performs an
action. So when the Admin locks a user I would like to iterate over all
sessions to see if that user is logged in and force a logout.

 

So my question is how can I access all created sessions?

 

-- 

Gustavo Felisberto.

WIT-Software S.A.

Coimbra (Portugal), San Jose (California)

Phone: +351239801030

Web:  <http://www.wit-software.com> http://www.wit-software.com