Session timeout in web.xml does not work for weblogic server

I set the timeout to 30 minutes in web.xml and successfully deployed webapp to WebLogic. Now the application is up and running, but when the maximum inactive interval reaches, the session is not disconnected. The same application correctly determines the time in tomcat.

Can anyone suggest any idea?

I also want to know if there is a weblogic.xml application. If so, where to find it?

+4
source share
2 answers

A couple of options that you have:

  • You can edit the web.xml file: Edit the session-timeout session-config in the web.xml file. Note that in web.xml, the session timeout is set in minutes.

    <session-config> <session-timeout>60</session-timeout> </session-config> 
  • You can edit the weblogic.xml file: Edit the session-param TimeoutSecs in the weblogic.xml file. 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 the web.xml file takes precedence over weblogic.xml. If you do not specify any values ​​in web.xml, weblogic.xml is used. A good approach to handling session timeout is to install it on web.xml, since web.xml takes precedence over application server 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.

+2
source

It’s good that the session timeout in both web.xml and weblogic.xml should work. Pls note that the unit in web.xml is a minute, but in weblogic.xml the second.

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

weblogic.xml should be under WEB-INF /

for the session descriptor in weblogic.xml:

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

+1
source

Source: https://habr.com/ru/post/1440246/


All Articles