hey Guys, I am using java with struts2 framework .and sqlserver 2005 database . i need help in preventing multiple user login with same username. i tried using session .. m new to this framework . if any one could help me it will be great . i did by using a flag in database and setting it to true .. and while logout it will be set to false .. but the problem i got is when some user accidently close the browser or some other interrupt happens .. the user will not be able to log in ...m totally confused wat method should i use ..i dint use any session or cookies .. if there s any simple method is there pls help me out of this ..
A:
i did by using a flag in database and setting it to true .. and while logout it will be set to false
This is not the way sessions should be handled. Use cookies or other proper session handling techniques.
http://www.roseindia.net/struts/struts2/struts2-login.shtml
Tutorials are available!
bdhar
2010-09-07 10:20:54
Please don't recommend RoseIndia tutorials. Its ugly.
chedine
2010-09-07 10:58:00
But I guess it serves the purpose.
pavanlimo
2010-09-07 11:13:28
+1
A:
Maintain application map with logged in user. if any user try to create different session with the same userid invalidate her session.
org.life.java
2010-09-07 10:22:40