title: preventing multiple user login for same user in java
body: <p>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 ..</p>