2 Replies Latest reply on Aug 25, 2011 5:32 PM by vinhqdo

    A4J.AJAX.onExpired

    vinhqdo

      I have the following code on my page

      A4J.AJAX.onExpired = function(loc, expiredMsg){

      alert('expired!');

      }

       

      The problem is the alert sometimes appears even though the Tomcat session has not timed out. In my web.xml, I set a session-timeout value of 8 hours so the user can stay logged on throughout the business day. 

       

      What is causing the onExpired event to be called?

       

      Thanks

        • 1. Re: A4J.AJAX.onExpired
          mp911de

          Hi,

          have you added

          <context-param>

          <param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>

          <param-value>true</param-value>

          </context-param>

           

          to your web.xml?

          • 2. Re: A4J.AJAX.onExpired
            vinhqdo

            Mark,

            Yes I used this context-param. It is annoying because the user gets the message in the middle of the session. Is it possible that the Richfaces AJAX timeout is different from the Tomcat timeout?