Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld >> Enterprise Java

Pages: 1
mndprasad
stranger


Reged: 06/02/08
Posts: 2
set Time interval
      #169546 - 06/23/08 12:44 PM

Hi all

I need a help here..am doing an application in jsp..i got struck in a position where i have not done that before

There are multiple users in my application..for each user the time allotement is 9am to 4pm...after 4 it should automatically logout and the admin can increase the time interval say upto 5..so that he can work til 5pm...
how can i do this...while logging also it should check the time


thanx in advance


Post Extras: Print Post   Remind Me!   Notify Moderator  
Rob_Purvis
stranger


Reged: 07/22/08
Posts: 5
Re: set Time interval [Re: mndprasad]
      #176078 - 07/25/08 05:30 AM

You could have a servlet loaded on startup that listens on session events. When a new session is started, register the user details, compare with the time and log them out (by invalidating their session).

Have a thread that checks these session details every minute and compares with the current time, and invalidates sessions of anyone who should be logged out.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 4870

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5