Session in jsp

Reply

Join Date: Apr 2009
Posts: 3
Reputation: d.devendran is an unknown quantity at this point 
Solved Threads: 0
d.devendran d.devendran is offline Offline
Newbie Poster

Session in jsp

 
0
  #1
May 12th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 31
Reputation: hardik.rajani is an unknown quantity at this point 
Solved Threads: 9
hardik.rajani's Avatar
hardik.rajani hardik.rajani is offline Offline
Light Poster

Re: Session in jsp

 
0
  #2
May 12th, 2009
try synchronizing the session object.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 3
Reputation: d.devendran is an unknown quantity at this point 
Solved Threads: 0
d.devendran d.devendran is offline Offline
Newbie Poster

Re: Session in jsp

 
0
  #3
May 12th, 2009
Originally Posted by hardik.rajani View Post
try synchronizing the session object.
hi hardik, thanks for ur reply, if you don't mine, can u give me a sample on that
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 5
Reputation: nabeel.alsafa is an unknown quantity at this point 
Solved Threads: 1
nabeel.alsafa nabeel.alsafa is offline Offline
Newbie Poster

Re: Session in jsp

 
0
  #4
May 12th, 2009
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
Last edited by happygeek; May 12th, 2009 at 7:04 am. Reason: fake sig snipped
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,612
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 463
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: Session in jsp

 
0
  #5
May 25th, 2009
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.
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 5
Reputation: swathirao is an unknown quantity at this point 
Solved Threads: 1
swathirao swathirao is offline Offline
Newbie Poster

Session in jsp

 
0
  #6
Jun 4th, 2009
how to clear sessions in jsp . please provide details.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,612
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 463
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: Session in jsp

 
0
  #7
Jun 4th, 2009
Originally Posted by swathirao View Post
how to clear sessions in jsp . please provide details.
  1. session.removeAttribute("key");
  2. and
  3. session.invalidate();
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC