0

hi, currently i'm working on new project, where once login using a particular id, it can not be use again to login in same machine even with different browser or even in other machine. how can done this. can i create a separate table in database so i can save and retrieve data od session id, creation time or last access time. can any one help me on this.

thanks

5
Contributors
6
Replies
7
Views
8 Years
Discussion Span
Last Post by __avd
0

try synchronizing the session object.

hi hardik, thanks for ur reply, if you don't mine, can u give me a sample on that

0

Yes,
you may use a table for keeping track of all the details of active sessions when one user successfully login. I think it will be also a good idea to record the login time and use a timeout.
As a session variable is not valid when user change the browser it will not be really handy to use simple session variables for your purpose.

And take care you does not LOCK OUT a user who accedentally forget to logout.

Regards,
SNIP

0

adatapost>I agree with nabeel. If you are able to and familiar with HttpSessionListener an its methods then you can do this thing in better way.

0

how to clear sessions in jsp . please provide details.

session.removeAttribute("key");
and
session.invalidate();
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.