Html 如何增加查看过期错误页面的显示时间?
我已经实现了ViewExpiredException处理,如所述和(感谢@BalusC和team)。它工作正常。但是,错误页面快速闪烁,用户不会被告知由于会话超时而被重定向。有没有办法让事情慢一点 以下是错误页面:Html 如何增加查看过期错误页面的显示时间?,html,jsf,Html,Jsf,我已经实现了ViewExpiredException处理,如所述和(感谢@BalusC和team)。它工作正常。但是,错误页面快速闪烁,用户不会被告知由于会话超时而被重定向。有没有办法让事情慢一点 以下是错误页面: <html lang="en"> <head> <title>Session Expired</title> <meta http-equiv="refresh" content="0;url=#{request.
<html lang="en">
<head>
<title>Session Expired</title>
<meta http-equiv="refresh" content="0;url=#{request.contextPath}/index.xhtml" />
</head>
<body>
<h1>Session Expired</h1>
<h3>You will be redirected to the starting page</h3>
<p><a href="#{request.contextPath}/index.xhtml">Click here if the redirect didn't work or if you are impatient.</a></p>
</body>
会话已过期
会话已过期
您将被重定向到起始页
行为和你告诉它的完全一样
<meta http-equiv="refresh" content="0;url=#{request.contextPath}/index.xhtml" />
实际上,这与jsf无关,而是与纯html相关。正常的404错误页面也会出现同样的问题,我不希望它消失。确定您的错误页面中没有http元刷新或其他内容吗?是的,我有(我在问题中添加了错误页面)。是否最好等待用户单击>您在发布之前不知道/注意到这一点?这样可以节省您创建问题的时间,因为它根本与jsf无关(也可以节省我的时间;-)。如果您使用这个简单的http服务器错误页面,也会出现同样的问题。最好的解决方案取决于您。添加几秒钟的延迟或等待点击抱歉,没有完成,Kukeltje。不知怎的,我突然想到重定向是处理超时异常的正常方法。我不知道如何增加延迟——这正是我所要求的。我想我应该用http或html标记发布。。。然后请了解
content=“0;
做什么……总是…;-)
<meta http-equiv="refresh" content="10;url=#{request.contextPath}/index.xhtml" />