开发者

java and jsp_session expired_redirect

开发者 https://www.devze.com 2022-12-30 08:36 出处:网络
I am working with java 开发者_StackOverflow中文版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 sessio

I am working with java 开发者_StackOverflow中文版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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号