主题:request的问题
jsp1:
<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
reg
</title>
</head>
<body bgcolor="#ffffff">
<form action="doreg.jsp" method="post">
<table width="22%" border="0" align="center">
<tr>
<td colspan="2">
<div align="center"><b><font size="+2">Reg page</font></b></div>
</td>
</tr>
<tr>
<td>
<div align="center">username:</div>
</td>
<td>
<input type="text" name="username">
</td>
</tr>
<tr>
<td>
<div align="center">password:</div>
</td>
<td>
<input type="password" name="password">
</td>
</tr>
<tr>
<td>
<div align="center">email:</div>
</td>
<td>
<input type="text" name="email">
</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="submit" name="ok" value="Ok">
<input type="reset" name="cancel" value="Cancel">
</div>
</td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>
jsp2:
<%@ page contentType="text/html; charset=GBK"
import="java.util.*"
%>
<html>
<head>
<title>
doreg
</title>
</head>
<body bgcolor="#ffffff">
<%
String username = request.getParameter("username");
String password = request.getParameter("password");
String email = request.getParameter("email");
%>
</body>
</html>
为什么username,password ,email 都得不到值
<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
reg
</title>
</head>
<body bgcolor="#ffffff">
<form action="doreg.jsp" method="post">
<table width="22%" border="0" align="center">
<tr>
<td colspan="2">
<div align="center"><b><font size="+2">Reg page</font></b></div>
</td>
</tr>
<tr>
<td>
<div align="center">username:</div>
</td>
<td>
<input type="text" name="username">
</td>
</tr>
<tr>
<td>
<div align="center">password:</div>
</td>
<td>
<input type="password" name="password">
</td>
</tr>
<tr>
<td>
<div align="center">email:</div>
</td>
<td>
<input type="text" name="email">
</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="submit" name="ok" value="Ok">
<input type="reset" name="cancel" value="Cancel">
</div>
</td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>
jsp2:
<%@ page contentType="text/html; charset=GBK"
import="java.util.*"
%>
<html>
<head>
<title>
doreg
</title>
</head>
<body bgcolor="#ffffff">
<%
String username = request.getParameter("username");
String password = request.getParameter("password");
String email = request.getParameter("email");
%>
</body>
</html>
为什么username,password ,email 都得不到值