Session Timeout in web.xml not working for weblogic server

岁酱吖の 提交于 2019-12-04 11:28:40

A couple of options you have:

  1. You can edit the File web.xml: Edit the session-timeout of the session-config in the file web.xml. Please note in web.xml, the session timeout is set in minutes.

    <session-config>
             <session-timeout>60</session-timeout>
    </session-config>
    
  2. You can edit the File weblogic.xml: Edit the session-param TimeoutSecs in the file weblogic.xml. In weblogic.xml, the session timeout is set in seconds.

     <session-descriptor>
           <session-param>
               <param-name>TimeoutSecs</param-name>
              <param-value>3600</param-value>
          </session-param>
     </session-descriptor>
    

Note that the timeout value set in web.xml takes precedence over weblogic.xml. If you don't set any values in web.xml, weblogic.xml takes over. A good approach to handle session timeout is setting this just on web.xml itself since web.xml takes precedence over application server’s deployment descriptors.

For more information refer to : http://download.oracle.com/docs/cd/E15523_01/web.1111/e13712/web_xml.htm#i1023849

Hope this helps.

well the session timeout setting in both web.xml and weblogic.xml should work. pls note that the unit in web.xml is minute, but in weblogic.xml is second.

And the timeout setting in web.xml takes precedence over weblogic.xml.

weblogic.xml should be under WEB-INF/

for session-descriptor in weblogic.xml:

http://docs.oracle.com/cd/E13222_01/wls/docs92/webapp/weblogic_xml.html#wp1071982

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!