spring mvc seesion超时iframe布局会造成登陆框内嵌问题

session超时刷新后登录页面嵌入在iframe中的解决办法

在login.jsp页面中添加以下一段js代码即可:

<script type="text/javascript">
var _topWin = window;  
while (_topWin != _topWin.parent.window) {  
     _topWin = _topWin.parent.window;  
}  
if (window != _topWin)_topWin.document.location.href = '${pageContext.request.contextPath}/login.jsp';  
</script>


猜你喜欢

转载自blog.csdn.net/zxz547388910/article/details/51085115