IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Redirect to a "Relogin" Page once the Session Expi

  • 1.  Redirect to a "Relogin" Page once the Session Expi

    Posted Thu September 09, 2010 05:07 AM

    Hi All

    Has anybody tried to redirect to a Relogin page when the Session gets expired…Do we have a solution where in we dont wish to make change in all portlets which are already deployed…Some thing like adding an extra tag in the web.xml of portal.war of the deploy folder to redirect globally…


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 2.  RE: Redirect to a "Relogin" Page once the Session Expi

    Posted Wed September 22, 2010 09:06 PM

    MWS can’t tell the difference between a request from a user who has
    logged out and a request from a user whose session has timed out, so
    there’s no way to do that. You could, however, add a custom portlet to
    the shell containing some javascript which would automatically navigate
    to some custom mws page when it calculates that the user’s session will
    have timed out:

    var waitForSessionTimout;

    function navigateAwayWhenSessionTimesout() {
    // clear existing timer
    if (waitForSessionTimeout)
    clearTimeout(waitForSessionTimeout);
    // wait for 31 minutes
    waitForSessionTimeout = setTimeout(function() {
    // display custom session-timeout page
    document.location.href = “/my-session-timeout-page”;
    }, 31 * 60 * 1000); // 31 minutes
    }
    // start timer
    navigateAwayWhenSessionTimesout();

    // re-start timer if an ajax request is made
    Ajax.Responders.register({
    onComplete: function() {
    // re-start waiting from now
    navigateAwayWhenSessionTimesout();
    }
    });

    See http://docs.sun.com/source/816-6408-10/window.htm#1203758 for docs
    on the javascript setTimeout() function, and
    http://docs.sun.com/source/816-6408-10/window.htm#1203758 for docs on prototype’s
    Ajax.Responders.

    (Credit goes to Justin for this response)


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods