• Post Reply Bookmark Topic Watch Topic
  • New Topic

Login Page For Jsp

 
Vinaya Naidu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi


I written a JSP application which is is password protected application. I want to prevent both users using the same user id and password login at the same. While both of them
login at the same time, both of them must b kick out from the application. how we will write logic any body have idea please help me.


Thanks&Regards
Vinay Kumar
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are manging the session for each user, just add the User ID as a session attribute .. and check it against all the stored session ..

OR

create a User DB column say 'active' , and when user logged in , just make its status to active ..
 
K. Tsang
Bartender
Posts: 3604
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or add the user ID into a set and check it against it when user attempt to login
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or add the user ID into a set


Ya, that just reduce your checking of each and every UserID stored..

Thanks K.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!