wood burning stoves
The moose likes Servlets and the fly likes Prevent multiple logins Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Prevent multiple logins" Watch "Prevent multiple logins" New topic

Prevent multiple logins

patidar janak

Joined: Mar 12, 2007
Posts: 6
i have make login module.i have check multiple login prevent using hash table and remove the entry from hash table when user logout.but problem is that when user close window without logout than how i will remove entry of hash table.is any listerner give me information or another method?

[Removed the 'shouting' and provided a meaningful topic - Dave]
[ March 14, 2007: Message edited by: David O'Meara ]
Wayan Saryada
Ranch Hand

Joined: Feb 05, 2004
Posts: 105

You can create a listener that implements javax.servlet.http.HttpSessionListener interface. This listener notify your about session creation and destroy events

Website: Learn Java by Examples
Gobind Singh
Ranch Hand

Joined: Aug 04, 2006
Posts: 62
You need to write some sort of clever javascript to invalidate the session on browser kill. Have a look at this forum: http://forum.java.sun.com/thread.jspa?threadID=537660&messageID=2640996
jQuery in Action, 3rd edition
subject: Prevent multiple logins
It's not a secret anymore!