初学者小问题,呵呵
01.jsp:
<%@ page language= "java " contentType= "text/html; charset=GBK "%>
<FORM ACTION= "02.jsp " METHOD= "POST ">
姓名:
<INPUT TYPE= "TEXT " NAME= "USERNAME ">
<BR>
密码:
<INPUT TYPE= "PASSWORD " NAME= "USERPASSWORD ">
<BR>
性别:
<INPUT TYPE= "RADIO " NAME= "SEX " VALUE= "男 ">
男
<INPUT TYPE= "RADIO " NAME= "SEX " VALUE= "女 ">
女
<BR>
血型:
<INPUT TYPE= "RADIO " NAME= "BLOOD " VALUE= "A ">
A
<INPUT TYPE= "RADIO " NAME= "BLOOD " VALUE= "B ">
B
<INPUT TYPE= "RADIO " NAME= "BLOOD " VALUE= "AB ">
AB
<INPUT TYPE= "RADIO " NAME= "BLOOD " VALUE= "O ">
O
<BR>
城市:
<SELECT SIZE= "1 " NAME= "CITY ">
<OPTION VALUE= "北京 ">
北京
</OPTION>
<OPTION VALUE= "南京 ">
南京
</OPTION>
<OPTION VALUE= "上海 ">
上海
</OPTION>
</SELECT>
<br>
<INPUT TYPE= "SUBMIT " VALUE= "提交 ">
<INPUT TYPE= "RESET " VALUE= "RESET ">
</FORM>
===================================================================
02.jsp
<%@ page language= "java " contentType= "text/html; charset=GBK "%>
<%
String strName = request.getParameter( "USERNAME ");
String password = request.getParameter( "USERPWD ");
String strUserSex = request.getParameter( "SEX ");
String strUserBlood = request.getParameter( "BLOOD ");
String strUserCity = request.getParameter( "CITY ");
%>
用户名:
<%=strName%>
<br>
密码:
<%=password%>
<br>
性别:
<%=strUserSex%>
<br>
血型:
<%=strUserBlood%>
<br>
城市:
<%=strUserCity%>
<br>
为什么在02.jsp显示密码和城市都是“???”,而密码显示的是null
不知道是哪里出问题了?
------解决方案--------------------String st=new(request.getParameter(“name”).getBytes(“ISO8859_1”)),