wood burning stoves*
The moose likes Servlets and the fly likes can we invalidate the session of  second user ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "can we invalidate the session of  second user ?" Watch "can we invalidate the session of  second user ?" New topic
Author

can we invalidate the session of second user ?

shyam ji gautam
Ranch Hand

Joined: Sep 17, 2011
Posts: 48
Dear all
First of all i want to tell the scenario actually i am making a application in which there is one user let us suppose User A is admin he will handle the admin part.

so let us suppose if any user B log in then for that user B in databse we set a flag which value is : N (AFTER LOGIN )
when user B logout this flag will goes to ;Y


so if user B is continue surfing the website at t=0 then that time if admin (user A ) Set the flag to Y for userb so is it possible for USER B goes on to the login page .

means can one sesssion interrupt (logout ) another user of different session id ?


thanks

Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3060
    
  38

Didn't you perhaps mention a solution yourself
Use an intercept filter that checks the whether flag of the current user is 'N'. When it isn't, the user should be redirected to the login page.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can we invalidate the session of second user ?