This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

stop multipe login with same user name

 
gevarghese varghese
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai,
I am doing a struts application I am bit new to this framework.
I have a requirement which is like this----

whenever a user is logging and without logging out he opens a new browser
with same user name and password OR in a different system he agian tries to login then the previously logged session should be deactivte.

For example just like yahoo mail.
whan a user logs in twice with same id and password more than once except the last logged session all previous sessions are deavtivated.

HOW TO DO THAT IN STRUTS PLEASE HELP ME ON THIS CASE
 
Oscar Gonzalez
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Save the username in the context (application)object of the application and make your page search for that user everytime you create a Session with a Listener.

If you use Struts make your Action extend of a BaseAction and check for the username in that one.
[ April 20, 2007: Message edited by: Oscar Gonzalez ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samuel,
Other places to put the check include in a servlet filter or by extending the Struts RequestProcessor.
 
gevarghese varghese
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oscar Gonzalez ,
thank's
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic