Session Timeout Configuration

From Documentation
< User:Hawk
Revision as of 04:07, 22 April 2014 by Hawk (talk | contribs) (Created page with "ZK session may use HttpSession or PortletSession depending on the execution environment. Hence, session timeout is not only controlled by ZK framework but also by Web container. ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ZK session may use HttpSession or PortletSession depending on the execution environment. Hence, session timeout is not only controlled by ZK framework but also by Web container.

From the highest to the lowest precedence, session timeout is determined by

1. Application code

    session.setMaxInactiveInterval(7200);          // in seconds

2. Application's zk.xml

    <session-config>
        <session-timeout>7200</session-timeout>    <!-- in seconds -->
    </session-config>

3. Application's web.xml

    <session-config>
        <session-timeout>120</session-timeout>     <!-- in minutes -->
    </session-config>

4. Server's web.xml

    <session-config>
        <session-timeout>120</session-timeout>     <!-- in minutes -->
    </session-config>