发布网友 发布时间:2022-04-21 04:48
共1个回答
热心网友 时间:2022-04-21 06:17
1. index.jsp中包含有iframe登陆成功后进入此页面进行session值判断,若无则使用jsp跳转方法跳到登陆页login.jspjsp跳转方法有以下几种:response.setHeader("refresh","1;url='../login.jsp'");response.sendRedirect("../login.jsp");<jsp:forward page="../login.jsp"</jsp:forward<jsp:include flush="true" page="../login.jsp"</jsp:include2. 在login.jsp中设置如下<script type="text/javascript"function checkParent(){if(window.parent.length0){window.parent.location="login.jsp";}</script</body只要session无值就会自动跳出框架且转到登陆页