How to check that Server Session timeout

Dear All

How I can track the users session in a web application?

Problem : A user logged in a application by proper authentication. but user did not work on application for some time, after some time user starts his/her work, in between if his/her session expires then he/she is working as an anonymous user.

what I want if users session expires then display a message to user and redirect to login page for authentication.

In my application “Anonymous” has “No Access” with read, write public documents. It is required.

Please help me to solve this problem.

Thanks

Regards

Ashish

Subject: How to check that Server Session timeout

Before submitting the document (or onBeforeUnload) you can make a background AJAX call to a protected page. If you get login page as response (check for “password” field and/or http status), then user is logged out and you can take appropriate action.

/Andrei

Sametime goes AJAX: Botstation - Sametime Widget Overview

Subject: RE: How to check that Server Session timeout

Thanks Mr. Andrei,

I am confused as you suggested to call AJAX in background.

Can I get it more descriptive or some code examples.

Thanks

Regards

Ashish

Subject: RE: How to check that Server Session timeout

Here is an example of javascript which calls a Domino page (agent that reverses a text string) without refreshing the currently opened web page: Post data to LotusScript agent using AJAX

Subject: RE: How to check that Server Session timeout

I realize it has been over two years since this thread ended - but I am having the same problem (using 8.5.1). The problem: The user opens a form - goes away - comes back to an open form and types a few lines into a text box (after their session has ended) - clicks ‘submit’ and gets a timeout/session expired message.

The AJAX code on Andrei’s page does not work for me. I get http_request.status == 404 instead of 200.

I have been unsuccessful in doing the following:

  • Ending a session when a user leaves the site

  • Letting the user know when their session has ended (immediately - without allowing them to continue typing in some text box)

Any help would be appreciated.

Leonardo