JSP Session Handling
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jagdish_Nasit
Posted On:   Thursday, June 17, 2004 09:00 PM


I want to handle user session such a way that only one user
can login with same user name. Ii should not allow more that one user to be login with same user id.


How i should code so that i can get the same.

Re: JSP Session Handling

Posted By:   Sheikh_Azad  
Posted On:   Friday, June 18, 2004 03:57 AM

This can be achieved in 2 ways:

1.Use Database table to set a flag Yes/No for logged in user.

2.Use a HashMap to store the login info,against the User Name as key and set the scope of this HashMap to 'application'.

DrawBack/Precaution:You should take extra precaution to logout the user forcefully if he/she closes the window or exits the application.
About | Sitemap | Contact