j_security_check连接中断 [英] j_security_check connection interrupted

查看:156
本文介绍了j_security_check连接中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Tomcat的认证。当我离开打开登录页面,约半小时左右,然后尝试登录,我收到以下错误:

I am using tomcat's authentication. When I leave the login page open for about half an hour so and then try to login, I get the following error:

网址:的http://本地主机/ PC / j_security_check

页面内容:

连接中断

到服务器的连接,而页面加载被重置。

The connection to the server was reset while the page was loading.

在协商的连接的网络连接被中断。请重试。

The network link was interrupted while negotiating a connection. Please try again.


  • 我的猜测是,由于Tomcat使用jsession cookie来维持会话和超时,我得到这个错误。这将是一个很好的解决这个问题呢?
    我使用Tomcat 6.0.20

推荐答案

只是让登录页面刷新自己,每当会话超时。您可以使用元刷新头和<一的href=\"http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html#getMaxInactiveInterval%28%29\"相对=nofollow> 的HttpSession#getMaxInactiveInterval() 在这里。最后的回报秒量的HttpSession 尚未生活,这正是你需要在元刷新头。什么

Just let the login page refresh itself whenever the session times out. You can make use of the meta refresh header and HttpSession#getMaxInactiveInterval() here. The last returns the amount of seconds the HttpSession has yet to live and that's exactly what you need in a meta refresh header.

<meta http-equiv="refresh" content="${pageContext.session.maxInactiveInterval}">

将其包含在HTML &LT;头方式&gt; 您的登录页面

这篇关于j_security_check连接中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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