简体   繁体   English

Jboss 5.1会话超时不起作用

[英]Jboss 5.1 Session Timeout Not working

I am facing the same issue where I am using Jboss 5.1 server and my session timeout doesnt work. 我在使用Jboss 5.1服务器时遇到相同的问题,并且会话超时不起作用。 I have tried the above steps by setting in deployers/jbossweb.deployer/web.xml . 我已经通过在deployers / jbossweb.deployer / web.xml中进行设置来尝试了上述步骤。 Also i tried by programmatically forcing the timeout using - HttpSession.setMaxInactiveInterval(int seconds) But still it doesnt get timed out. 我也尝试通过编程方式强制使用-HttpSession.setMaxInactiveInterval(int seconds)超时,但仍然不会超时。

Please suggest/ help.... 请提出建议/帮助。

HttpSession.setMaxInactiveInterval(0) 

if you set the value to 0 it timesout immediately. 如果将值设置为0,则立即超时。

if you want the session to stay idle till 60 minutes then specify in seconds 60*60 如果您希望会话保持空闲状态直到60分钟,请在60秒内指定60 * 60

HttpSession.setMaxInactiveInterval(3600);

i think literally u are calling HttpSession.... .the above does not work . 我认为从字面上看您正在调用HttpSession ....。以上不起作用。 try below ,also let me know how you have configured in web.xml(paste the configuration in your question.) 尝试以下,也让我知道您如何在web.xml中进行配置(将配置粘贴到您的问题中。)

request.getSession(false).setMaxInactiveInterval(3600);

while you need to specify the runtime parameter while running JBOSS server as below , to do it go to jboss-5.0.1.GA\\server\\default\\deploy then edit the xml file named properties-service.xml and add the following xml snippet . 当您需要在运行以下JBOSS服务器时指定运行时参数时,请转到jboss-5.0.1.GA \\ server \\ default \\ deploy,然后编辑名为properties-service.xml的xml文件并添加以下xml片段。

 // Set raw properties file style properties.

<attribute name="Properties">
        org.apache.catalina.STRICT_SERVLET_COMPLIANCE=false
</attribute>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM