为什么我的 httpServletRequest 返回 null?
<form action="updateUserData" method="post" accept-charset="utf-8">
<input type="hidden" name="email" value="<%=user_email%>">
<table>
<tr>
<td><label for="usermail">Email</label></td>
<td><%=user_email%></td>
</tr>
<tr>
<td><label for="password">Password</label></td>
<td><input type="password" name="password" required> <br></td>
</tr>
<tr>
<td><label for="user_name">Name</label></td>
<td><input type="text" name="user_name" value="<%=user_name%>" required> <br></td>
</tr>
<tr>
<td><label for="user_name">Total Wins</label></td>
<td><input type="text" name="total_wins" value=<%=total_wins%> required> <br></td>
</tr>
</table>
<input type="submit" value="Update">
</form>
这是我的小服务程序:
小服务程序:
resp.getWriter().println(" email from jsp : " + req.getAttribute("email"));
resp.getWriter().println(" password from jsp : " + req.getAttribute("password"));
resp.getWriter().println(" user's name from jsp : " + req.getAttribute("user_name"));
resp.getWriter().println(" total score from jsp : " + req.getAttribute("total_wins"));
当我点击 sumbit 时,所有输出都显示为空。我不知道为什么。任何人?