java 和 jsp_session expired_redirect

发布于 2024-09-01 01:43:09 字数 89 浏览 2 评论 0原文

我正在使用 java 和 jsp 进行邮件项目。我想在会话过期时通过某种方式使用 xml r 重定向页面,或者我想在会话过期时停用窗口。

提前致谢。

I am working with java and jsp for mail project. I want to redirect the page with xml r by some way when the session is expired or I want to deactivate the window when session is expired.

thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少女净妖师 2024-09-08 01:43:09

如果我理解正确的话,如果会话过期,您希望网络浏览器更改到另一个页面。

有一些方法可以做到这一点:

  1. 使用 setTimeout(location.href='/logoff.jsp', 3600) 进行 Javascript 重定向
  2. MATA-Tag REFESH:

在这两个示例中,会话在 3600 秒后失效。为了确定起见,您应该在会话失效之前稍微重定向浏览器。

If I understood you correct you want the Webbrowser to change to another page, if the session expires.

There are some ways to do this:

  1. Javascript redirect with setTimeout(location.href='/logoff.jsp', 3600)
  2. MATA-Tag REFESH: <meta http-equiv="refresh" content="3600; url=/loggedoff.jsp">

In both examples, the session invalidates after 3600 seconds. You should redirect the browser slightly before the session invalidates, just to be sure.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文