session过期返回登录页面跳出iframe

方法1:通过Response回写跳转js

response.getWriter().print("<html><script>window.open ('"+request.getContextPath()+"/login.jsp','_top')</script></html>");

方法2:通过在登录页添加js

if(window != top) {				    
    top.location.href = window.location.href;
}

猜你喜欢

转载自blog.csdn.net/qq_23994787/article/details/80598033