Example usage for com.liferay.portal.kernel.util ServerDetector isJetty

List of usage examples for com.liferay.portal.kernel.util ServerDetector isJetty

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util ServerDetector isJetty.

Prototype

@Deprecated
public static boolean isJetty() 

Source Link

Usage

From source file:com.liferay.portlet.PortletServletRequest.java

License:Open Source License

@Override
public HttpSession getSession() {
    HttpSession session = new PortletServletSession(_request.getSession(), _portletRequestImpl);

    if (ServerDetector.isJetty()) {
        try {//from w  w w. j  a v a2s  . co  m
            session = wrapJettySession(session);
        } catch (Exception e) {
            _log.error(e, e);
        }
    }

    return session;
}

From source file:com.liferay.portlet.PortletServletRequest.java

License:Open Source License

@Override
public HttpSession getSession(boolean create) {
    HttpSession session = new PortletServletSession(_request.getSession(create), _portletRequestImpl);

    if (ServerDetector.isJetty()) {
        try {/*from ww w .  j a v a 2 s  . c om*/
            session = wrapJettySession(session);
        } catch (Exception e) {
            _log.error(e, e);
        }
    }

    return session;
}