wood burning stoves 2.0*
The moose likes Servlets and the fly likes how to invalidate a session from another computer by using ip/MAC sessionid Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to invalidate a session from another computer by using ip/MAC sessionid" Watch "how to invalidate a session from another computer by using ip/MAC sessionid" New topic
Author

how to invalidate a session from another computer by using ip/MAC sessionid

Satchidananda Mohanty
Ranch Hand

Joined: Mar 12, 2008
Posts: 77

Hi Guys,

I wanted to invalidate the session of one computer from another computer.

For e.g. am logged in to my account in one computer and left that computer without looging out. Now While am going to login agian with another machine it shows that the same user credentials are logged in with another system and please sign out all other sytems from here and login again

On this submit I want to invalidate the sessions with all other systems. I save all the ip and session id with our database. So my query is can I invalidate those sessions by using the session id and ip address .

Gmail is having the same feature.
So guys if you have any idea kindly let me know.


Thanks in advance,
zeet


Zeet

SCJP 6.0
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3023
    
  35

You can do it in many ways. One way is checking the last login time from a filter. Once the user has requested to invalidate all of the other sessions, the filter can check the requests coming with the same credentials, and discard all the sessions if their last login time is prior to the time that the invalidation has request issued.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

This is a nice question , how to invalidate a Previous session of same crediantals ??

and discard all the sessions from a Filter


Assume that the Filter has found out an existing user , but how can from a Filter i can invalidate the session , Is it possible to get that sessionId (The previous Logged SessionId) to invalidate it ??


Save India From Corruption - Anna Hazare.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to invalidate a session from another computer by using ip/MAC sessionid
 
Similar Threads
Issue in session manegement
Is it possible to merge two session?
Get previous session with the Session Id
Prevent Duplicate Logins
HttpSession