我做了一个JSP测试页面,但是怎么调试都不行,大侠们帮忙看一下,代码如下:
<%@pagelanguage="java"contentType="text/html;charset=gb2312"%><%Stringpath=request.ge...
<%@ page language="java" contentType="text/html;charset=gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>loginWindow</title>
<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">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body><%@ include file="index.html" %>
<a href="two.jsp">goto two--></a><br>
this example show include works
<jsp:include page="two.jsp" flush=true>
<jsp:param name="a1" value=<%=request.getParameter("username") %>"/>
<jsp:param name="a2" value=<%=request.getParameter("password") %>"/>
</jsp:include>
</body>
</html> 展开
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>loginWindow</title>
<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">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body><%@ include file="index.html" %>
<a href="two.jsp">goto two--></a><br>
this example show include works
<jsp:include page="two.jsp" flush=true>
<jsp:param name="a1" value=<%=request.getParameter("username") %>"/>
<jsp:param name="a2" value=<%=request.getParameter("password") %>"/>
</jsp:include>
</body>
</html> 展开
4个回答
展开全部
你看看<jsp:param name="a1" value=<%=request.getParameter("username") %>"/>
<jsp:param name="a2" value=<%=request.getParameter("password") %>"/>
中的两个参数username,password你定义了么?可能是这个问题
<jsp:param name="a2" value=<%=request.getParameter("password") %>"/>
中的两个参数username,password你定义了么?可能是这个问题
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
貌似你的@ include需要写到头部吧.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询