页面间传值的一段代码,请大家帮看一下
<%@ page contentType= "text/html;charset=gb2312 "%>
<html>
<body >
<TABLE width= "780 " border=0 align= "center " bgcolor= "#edf2f6 ">
<form name= "form1 " method= "post " action= "t.jsp ">
<tr>
<td>
输入原始密码
<input type= "text " name= "oldpwd " size= "6 " maxlength=6 /> </td>
<td> <input type= "image " src= "images/save.jpg "> </td>
</tr>
</form>
</TABLE>
</body>
</html>
t.jsp代码如下:
request.setCharacterEncoding( "GB2312 ");
String old=request.getParameter( "oldpaw ");
out.print(old+ "* ");
屏幕显示的是null,为何值没有传过去?
------解决方案--------------------String old=request.getParameter( "oldpaw ");
参数写错了(oldpaw)