• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regarding session

 
santhosh kumar vk
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

I am working in one project in that any one user can log in after log in we will insert user id in database we will maintain about user using session, suppose he logged out means we will call some query to remove his status from database but in some time session will expire so i could not remove the status at database, how to remove status in database before expire session.



Thanking You.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has nothing to do with Struts--I'm not sure what you're asking; are you asking about session listeners?
 
santhosh kumar vk
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

how to call a method automatically before session expire. please help me.

Thanking You
 
chets patel
Ranch Hand
Posts: 77
Eclipse IDE Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you want to put in database while session is active....this is expensive operation. You can directly store the data in session it self.
for example
 
santhosh kumar vk
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

You are telling absolutely right but session will expire by 30 minutes after 30 minutes how to deactivate in database.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote:[...] are you asking about session listeners?
 
santhosh kumar vk
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
Yes i am asking session listener how to write code for that can you help me.


Thanking You.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked at the API for HttpSessionListener? That's a link to it, by the way; clicky.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic