Example usage for javax.servlet.http HttpServletRequest isRequestedSessionIdValid

List of usage examples for javax.servlet.http HttpServletRequest isRequestedSessionIdValid

Introduction

In this page you can find the example usage for javax.servlet.http HttpServletRequest isRequestedSessionIdValid.

Prototype

public boolean isRequestedSessionIdValid();

Source Link

Document

Checks whether the requested session ID is still valid.

Usage

From source file:org.wso2.carbon.identity.application.authenticator.iwa.ntlm.IWAAuthenticator.java

private void invalidateSession(HttpServletRequest request) {
    if (request.isRequestedSessionIdValid()) {
        request.getSession().invalidate(); // invalidate the session. ie. clear all attributes
        request.getSession(true); // create a new session thereby creating a new jSessionID
    }/*from w ww  . j a  v a  2  s  .c o m*/

}

From source file:org.yawlfoundation.yawl.monitor.jsf.SessionTimeoutFilter.java

private boolean isInvalidSession(HttpServletRequest httpServletRequest) {
    return (httpServletRequest.getRequestedSessionId() != null)
            && !httpServletRequest.isRequestedSessionIdValid();
}