用jsp编写网站时页面跳转,总是显示页面跳转这一页,是什么原因? 5
<%@pagelanguage="java"import="java.util.*"pageEncoding="utf-8"%><%@taglibprefix="c"ur...
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
<script type="text/javascript">
function tiao()
{
<c:if test="${sessionScope.userType==0}">
window.location.href="<%=path %>/admin/index.jsp";
</c:if>
}
setTimeout(tiao,1300)
</script>
<br> <br> <br> <br> <br> <br> <br> <br> <br>
<center><img src="<%=path %>/img/loading.gif">页面跳转中</center>
</body>
</html>
这个是loginsuccess.jsp中的代码,页面跳转不到index.jsp页面。 展开
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
<script type="text/javascript">
function tiao()
{
<c:if test="${sessionScope.userType==0}">
window.location.href="<%=path %>/admin/index.jsp";
</c:if>
}
setTimeout(tiao,1300)
</script>
<br> <br> <br> <br> <br> <br> <br> <br> <br>
<center><img src="<%=path %>/img/loading.gif">页面跳转中</center>
</body>
</html>
这个是loginsuccess.jsp中的代码,页面跳转不到index.jsp页面。 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询