关于 iframe session登录超时 嵌套问题

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

只要在login.jsp页面上加上以以下js代码


<script type="text/javascript">
/**
 * 用于跳出iframe 登录超时问题
 */
	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/hiboyljw/article/details/54617692