LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-07-2009, 10:09 AM   #1
klroller
LQ Newbie
 
Registered: Oct 2009
Posts: 3

Rep: Reputation: 0
Post Apache - Tomcat How to use session ID to confirm an active user session?


Apache – Tomcat

We have a webapp which includes a MySQL log table of the user’s log on and log off activity. If the user closes the webapp by using the webapp “Log Off” button, the webapp will update the MySQL log table with the timestamp of the logoff. If the user closes the browser without using the webapp “Log Off” button the time stamp is not written at exit. We have a maximum idle time for a session; after it expires the webapp session is closed.

We capture the session id in our log file.

Question: Could a program using the session id, check CentOS to see if the session is still active? If this is possible,we could detect expired sessions and then write the logoff time into the webapp log file.

Your comments and suggestions are appreciated.

Thanks

Last edited by klroller; 10-08-2009 at 06:59 AM. Reason: Feedback- Recommendation to Edit Title
 
Old 10-08-2009, 03:24 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
this is clearly nothing to do with CentOS at all, that's just the operating system. You might want to change the thread title to be about tomcat and your own code, not centos.
 
Old 10-08-2009, 07:00 AM   #3
klroller
LQ Newbie
 
Registered: Oct 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks Chris,

Edit done.

Kerry
 
Old 10-08-2009, 07:55 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I think that your main problem is going to be that http is a stateless protocol, so 'active' isn't really a state option. I guess you could have your page have a timer loop in JS that 'pings' ie sends a msg to your server every so often, but that's more network load and I'm not sure if that would also affect the user.
NB: I'm not a web programmer, so take the latter sentence with a pinch of salt.
 
Old 10-08-2009, 09:43 PM   #5
klroller
LQ Newbie
 
Registered: Oct 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your reply

Thanks for your reply. My programming team has not come with an answer. So I thought asking for a cross section of opinions would be helpful.
I appreciate you taking the time to consider the issue and reply.

Best regards,

KR
 
  


Reply

Tags
centos, id, logging, session, user



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing an Active SSH Session neoform Linux - Newbie 3 05-07-2009 03:50 PM
Is it possible to access my session via desktop sharing while another user is active? sonichedgehog Linux - Software 22 05-08-2008 06:09 PM
How do I tear down an active tcp/udp session thru my firewall drokmed Linux - Security 9 04-11-2008 12:07 PM
Remote into active session??? tiger.woods Linux - General 11 03-29-2006 06:16 AM
Active X session Sonte Linux - Newbie 1 03-06-2004 01:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration