1 web.xml
設(shè)置WEB應(yīng)用程序描述符web.xml里的<session-timeout>元素。這個(gè)值以分鐘為
單位,并覆蓋weblogic.xml中的TimeoutSecs屬性
? <session-config>
??? <session-timeout>54</session-timeout>
? </session-config>
此例表示Session將在54分鐘后過(guò)期
當(dāng)<session-timeout>設(shè)置為-2,表示將使用在weblogic.xml中設(shè)置的
TimeoutSecs這個(gè)屬性值。
當(dāng)<session-timeout>設(shè)置為-1,表示Session將永不過(guò)期,而忽略在
weblogic.xml中設(shè)置的TimeoutSecs屬性值。
該屬性值可以通過(guò)console控制臺(tái)來(lái)設(shè)置
2 weblogic.xml
設(shè)置WebLogic特有部署描述符weblogic.xml的<session-descriptor>元素的
TimeoutSecs屬性。這個(gè)值以秒為單位
<session-descriptor>
?? <session-param>
????? <param-name>TimeoutSecs</param-name>
????? <param-value>3600</param-value>
?? </session-param>
</session-descriptor>
默認(rèn)值是3600