6 Replies Latest reply on Mar 13, 2007 6:38 PM by Sergey Smirnov

    Session Expired Handling with Ajax4jsf

    Kent Fletcher Newbie

      I have read from the documentation a cryptic example of how to handle http session expiration using ajax4jsf.

      Here is the snippet from the documentation.....
      --------------------------------------------------------
      Beginning with Ajax4jsf version 1.0.5 it's possible to redefine also the "onExpired" framework method that is called on the "Session Expiration" event.

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

      // Custom Developer Code

      };

      Here the function receives in params:

      * loc - URL of the current page (on demand can be updated)
      * expiredMsg - a default message on "Session Expiration" event.

      Note:
      Until the version 1.0.5 the method can't be redefined on "Session Expiration" , a confirmation dialog with request for view reloading was always called.


      ------------------------------------ End of snippet.

      I put this javascript in my jsp, and put in an alert to see if the session expiration event was captured. I set my session expiration to 1 minute in my web.xml. But the alert never popped up. Does anyone have a real life example how to handle the session expiration using ajax4jsf? Thanks, Kent.