主题:request的问题
request3.html:
<html>
<head>
<title>表单应用例子</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF">
<form method ="post" action="request3.jsp">
<p>姓名:
<input type="text" name="name">
</p>
<p>Email:
<input type="text" name="email">
</p>
<p>意见:
<textarea name="yj"></textarea>
</p>
<p>
<input type="submit" name="submit" value="发送">
</p>
</form></body></html>
------------------------------------------
request3.jsp:
<%@ page contentType="text/html;charset=gb2312"%>
<html>
<head>
<title>表单应用例子</title>
</head>
<body>
姓名:
<% out.println(request.getParameter("name")); %>
Email:
<% out.println(request.getParameter("email")); %>
意见:
<% out.println(request.getParameter("yj")); %>
</body>
</html>
我刚学JSP,请大虾帮我看看上面的程序有没有错,为什么参数没有输出呢?
<html>
<head>
<title>表单应用例子</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF">
<form method ="post" action="request3.jsp">
<p>姓名:
<input type="text" name="name">
</p>
<p>Email:
<input type="text" name="email">
</p>
<p>意见:
<textarea name="yj"></textarea>
</p>
<p>
<input type="submit" name="submit" value="发送">
</p>
</form></body></html>
------------------------------------------
request3.jsp:
<%@ page contentType="text/html;charset=gb2312"%>
<html>
<head>
<title>表单应用例子</title>
</head>
<body>
姓名:
<% out.println(request.getParameter("name")); %>
Email:
<% out.println(request.getParameter("email")); %>
意见:
<% out.println(request.getParameter("yj")); %>
</body>
</html>
我刚学JSP,请大虾帮我看看上面的程序有没有错,为什么参数没有输出呢?