File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes regarding session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "regarding session" Watch "regarding session" New topic
Author

regarding session

santhosh kumar vk
Ranch Hand

Joined: Aug 25, 2009
Posts: 144
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Aug 25, 2009
Posts: 144
hi,

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

Thanking You
chets patel
Ranch Hand

Joined: Apr 27, 2010
Posts: 74

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

Joined: Aug 25, 2009
Posts: 144
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

Joined: Sep 29, 2008
Posts: 12617

I wrote:[...] are you asking about session listeners?
santhosh kumar vk
Ranch Hand

Joined: Aug 25, 2009
Posts: 144
hi
Yes i am asking session listener how to write code for that can you help me.


Thanking You.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Have you looked at the API for HttpSessionListener? That's a link to it, by the way; clicky.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regarding session