Ajax调用不续订会话超时在Tomcat 6 [英] Ajax calls don't renew session timeout on Tomcat 6

查看:98
本文介绍了Ajax调用不续订会话超时在Tomcat 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我迁移我的web应用程序从Tomcat 5.5到Tomcat 6(.0.32)。在该应用程序有每尾页ajax调用,以避免会话超时。它工作正常,在Tomcat 5.5,但它并没有在Tomcat中6工作,我使用过滤器来跟踪在数据库表中的每个电话。在非Ajax调用,我可以看到在跟踪表和复位会话超时。在Ajax调用,我可以看到跟踪表中,但不是会话超时的复位。

I migrated my webapp from Tomcat 5.5 to Tomcat 6(.0.32). In that app there are ajax calls in every footer page to avoid session timeout. It works fine on Tomcat 5.5 but it doesn't work in Tomcat 6. I use a filter to track every call in a DB table. On non-ajax calls I can see the tracking in the table and the reset session timeout. On ajax calls I can see the tracking in the table but not the reset of the session timeout.

为什么呢?我可以改变这种行为?而且,只为信息,怎么能分辨的tomcat6 Ajax调用?

Why? Can I change this behavior? And, just for info, how can Tomcat6 distinguish the ajax calls?

推荐答案

如果你没有明确访问会话响应AJAX调用,您可能需要设置的 org.apache.catalina.STRICT_SERVLET_COMPLIANCE 系统属性。当然,这也可能会影响你的应用程序的其他部分。另一种选择是,以确保你明确地访问会话...

If you're not explicitly accessing the session in response to the AJAX calls, you may need to set the org.apache.catalina.STRICT_SERVLET_COMPLIANCE system property. Of course, that may also impact other parts of your app. Another option would be to ensure that you do explicitly access the session...

这篇关于Ajax调用不续订会话超时在Tomcat 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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