主题:初学 JSP,帮忙看看错误
<!--jspforward.jsp-->
<%@ page contentType="text/html;charset=gb2312" language="java"%>
<title>jspforward</title>
hello:
<%=(String) request.getParameter("g")%>
<%=(String) request.getParameter("mess")%>
<!--test.jsp-->
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page language="java"%>
<html>
<head>
<title>JSP:forward</title>
</head>
<body>
<form action="" method="post" name="form">
请输入姓名:<input
type="text" name="names"><br>
请输入验证码:<input type="text" name="password"><br>
<input type="submit" name="submit"
value=" 验 证 "> <%
String names = request.getParameter("names");
String password = request.getParameter("password");
if (password.equals("good")) {
%> <jsp:forward page="jspforward.jsp">
<jsp:param name="g" value="<%=names%>" />
<jsp:param name="mess" value="you are sucess!" />
</jsp:forward> <%
} else {
%> <jsp:forward page="jspforward.jsp">
<jsp:param name="g" value="<%=names%>" />
<jsp:param name="mess" value="Your password is mistake!" />
</jsp:forward> <%
}
%>
</form>
</body>
</html>
错误信息:
org.apache.jasper.JasperException: Exception in JSP: /test8.jsp:16
13: value=" 验 证 "> <%
14: String names = request.getParameter("names");
15: String password = request.getParameter("password");
16: if (password.equals("good")) {
17: %> <jsp:forward page="jspforward.jsp">
18: <jsp:param name="g" value="<%=names%>" />
19: <jsp:param name="mess" value="you are sucess!" />
<%@ page contentType="text/html;charset=gb2312" language="java"%>
<title>jspforward</title>
hello:
<%=(String) request.getParameter("g")%>
<%=(String) request.getParameter("mess")%>
<!--test.jsp-->
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page language="java"%>
<html>
<head>
<title>JSP:forward</title>
</head>
<body>
<form action="" method="post" name="form">
请输入姓名:<input
type="text" name="names"><br>
请输入验证码:<input type="text" name="password"><br>
<input type="submit" name="submit"
value=" 验 证 "> <%
String names = request.getParameter("names");
String password = request.getParameter("password");
if (password.equals("good")) {
%> <jsp:forward page="jspforward.jsp">
<jsp:param name="g" value="<%=names%>" />
<jsp:param name="mess" value="you are sucess!" />
</jsp:forward> <%
} else {
%> <jsp:forward page="jspforward.jsp">
<jsp:param name="g" value="<%=names%>" />
<jsp:param name="mess" value="Your password is mistake!" />
</jsp:forward> <%
}
%>
</form>
</body>
</html>
错误信息:
org.apache.jasper.JasperException: Exception in JSP: /test8.jsp:16
13: value=" 验 证 "> <%
14: String names = request.getParameter("names");
15: String password = request.getParameter("password");
16: if (password.equals("good")) {
17: %> <jsp:forward page="jspforward.jsp">
18: <jsp:param name="g" value="<%=names%>" />
19: <jsp:param name="mess" value="you are sucess!" />