1 Reply Latest reply on Mar 20, 2007 12:28 PM by app4you

    Displaying session expiry

      Hi there,

      Does anyone have a method for displaying to the user that their session has expired. I have a filter that redirects requests to the login page before the user is logged in. If the session expires then the next request will redirect to the login page. I would like to display an additional message on the login page about the timeout in the latter case but I can't see how to differentiate between a not-logged-in and a session-expired as the Session scoped component that holds the user information has been destroyed.

      Any help appreciated.

      Cheers.

      Mike.

        • 1. Re: Displaying session expiry
          app4you

          Hi,

          2 options:

          1. Use the Javascript setTimeout(alertMeAndRedirect, 30minutes) attached to the window's onload event
          2. or Ajax a servlet to sniff to find out if session variable still exists. If the response = blah, then location.href='/index.jsp?timeout=true'; or redirect within the servlet filter but I had problem with Seam 1.1 awhile back