Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Invalidating a session ?

 
Trader Joey
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on an application where i maintain in a users session a value "myapp.user.LoggedIn" ( boolean ) where true indicates the user is a valid user ( his password and user name have been verified ). This allows me to allow access to web pages only to valid user. I have a "log out" option on each page that invalidates this session. Often users dont necessarily use "log out". How do I invalidate such sessions ?
Thanks in advance
Nikhil
 
Ramneek Handa
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well to invalidate the user you can use session binding events or time out kind of things otherwise in case use closes the browser then he cann't go to that session again so if the user is new then you can hop him to login page.
bye.
 
ram mohan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ramneek,
Can u explain what is "session binding events"?
As u said using timeout is very easy I believe.Because by changing the server session expiring time we can achieve this too..
 
ricky gonzalez
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I think some servers and servlet containers automatically invalidate the session. JWS invalidates a session automatically after 30 minutes.
 
Ramneek Handa
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ram Mohan
you can refer to the classes HttpSessionBindingEvent and HttpSessionBindingListener.
 
ram mohan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ramneek Handa
 
manjunath kl
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
manjunath kl
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by manjunath kl:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic