File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 3013
    
  35

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.


Founder of ExamLab and Systemup
See how I can help you to become an awesome programmer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can we invalidate the session of second user ?
 
Similar Threads
how to forcefully log out in admin module?
is admininstrator able to view the data for activity time?
how to forcefully log out in admin module?
please help me spring mvc
How to get session object by giving Session Id to kill another session in Websphere