web.xml 中的会话超时不适用于 weblogic 服务器 [英] Session Timeout in web.xml not working for weblogic server

查看:38
本文介绍了web.xml 中的会话超时不适用于 weblogic 服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在 web.xml 中将超时设置为 30 分钟,并已在 WebLogic 中成功部署了 web 应用程序.现在应用程序已启动并正在运行,但是当达到最大非活动间隔时,会话不会超时.同一个应用程序在 tomcat 中正确超时.

I have set the timeout to 30 mins in web.xml and have successfully deployed the webapp in WebLogic. Now the app is up and running but when the max inactive interval reaches, the session doesn't timeout. This same app is timing out in tomcat properly.

有人可以提出一些想法吗?

Can anyone please suggest some idea?

我还想知道是否有特定于应用程序的 weblogic.xml?如果是,那么我在哪里可以找到它?

Also I want to know whether there is an app specific weblogic.xml? If yes, then where do I find it?

推荐答案

您有几个选择:

  1. 您可以编辑文件 web.xml:编辑文件 web.xml 中 session-config 的 session-timeout.请注意,在 web.xml 中,会话超时以分钟为单位设置.

  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>

  • 您可以编辑文件 weblogic.xml:编辑文件 weblogic.xml 中的 session-param TimeoutSecs.在 weblogic.xml 中,会话超时以秒为单位设置.

  • 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>
    

  • 请注意,在 web.xml 中设置的超时值优先于 weblogic.xml.如果您没有在 web.xml 中设置任何值,weblogic.xml 将接管.处理会话超时的一个好方法是仅在 web.xml 本身上设置它,因为 web.xml 优先于应用服务器的部署描述符.

    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.

    有关更多信息,请参阅:http://download.oracle.com/docs/cd/E15523_01/web.1111/e13712/web_xml.htm#i1023849

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

    希望这会有所帮助.

    这篇关于web.xml 中的会话超时不适用于 weblogic 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆