基于tomcat表单的身份验证的HTTP状态408错误 [英] HTTP Status 408 error with tomcat form based authentication

查看:250
本文介绍了基于tomcat表单的身份验证的HTTP状态408错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序是用 JSP 编写的,并且具有基于表单的身份验证。我正在使用Apache和Tomcat 7.

My application is written in JSP and has Form based authentication. I am using Apache and Tomcat 7.

这是我的问题:

有时当会话超时和何时我尝试重新登录到应用程序,它显示以下408错误消息:

Sometimes when session times out and when I try re-login to application, it displays the below 408 error message:

HTTP状态408 - 已超出登录过程所允许的时间。如果您希望继续,则必须再次点击两次并重新点击您请求的链接或关闭并重新打开您的浏览器

如果有人可以,则表示赞赏帮助我解决这个问题。

Appreciated if somebody can help me to resolve this.

推荐答案

我认为这归功于Internet Explorer的会话cookie处理。您可以尝试两种可能的解决方案。

I think this is down to session cookie handling by Internet Explorer. Two possible solutions you can try.

1。修改Internet Explorer Cookie处理首选项

单击工具 - > Internet选项,然后单击隐私选项卡,然后单击高级按钮。
选中覆盖自动cookie处理,然后确保第一方和第三方cookie设置为接受,并选中始终允许会话cookie。

Click Tools -> Internet Options, then click on the Privacy tab, then the Advanced button. Check 'Override automatic cookie handling', then make sure first party and third party cookies are set to accept, and check 'Always allow session cookies'.

2。将http-equiv元标记添加到生成的HTML

<meta http-equiv="Cache-Control" content="no-store,no-cache,must-revalidate"> 
<meta http-equiv="Pragma" content="no-cache"> 
<meta http-equiv="Expires" content="-1"> 

或者这些可以作为标题直接添加到回复中。

Alternatively these can be added as headers directly to the response.

response.addHeader("Cache-Control", "no-store,no-cache,must-revalidate");
response.addHeader("Pragma", "no-cache");
response.addHeader("Expires", "-1");

这篇关于基于tomcat表单的身份验证的HTTP状态408错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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