主题:不能获取汉字传值?在线等~
第一个JSP:
<%@ page language="java" contentType="text/html; charset=gbk"
pageEncoding="gbk"%>
<html>
<head>
<title>Mp3调查</title>
</head>
<body>
<form name=myform method=post action="ExamineResult.jsp">
<table border = 0 align = center>
<tr>
<td><div>1.你是否听说过该品牌?</div></td>
</tr>
<tr>
<td>
<input type=radio name = pinpai checked value = 听说过>听说过<br>
<input type=radio name = pinpai value = 没有>没有
</td>
</tr>
<tr>
<td><div>2.您认为该产品的质量怎么样?</div></td>
</tr>
<tr>
<td>
<input type=radio name = zhi checked value = 很好>很好<br>
<input type=radio name = zhi value = 一般>一般<br>
<input type = radio name = zhi value=好>好<br>
<input type = radio name= zhi value = 差>差
</td>
</tr>
<tr>
<td><div>3.您认为该产品的市场价格怎么样?</div></td>
</tr>
<tr>
<td>
<input type=radio name = price checked value = 太高>太高<br>
<input type=radio name = price value = 高>高<br>
<input type = radio name = price value=合适>合适<br>
<input type = radio name= price value = 偏低>偏低<br>
<input type = radio name = price value=特低>特低
</td>
</tr>
<tr>
<td><div>4.您是否购买过该产品?</div></td>
</tr>
<tr>
<td>
<input type=radio name = buy checked value = 购买过>购买过<br>
<input type=radio name = buy value = 没有>没有
</td>
</tr>
<tr>
<td><div>5.您是否以后会购买该产品?</div></td>
</tr>
<tr>
<td>
<input type=radio name = buyed checked value = 会>会<br>
<input type=radio name = buyed value = 不会>不会
</td>
</tr>
<tr>
<td><div>6.对产品的建议</div></td><br>
<td>
<input type = text name = yi value="" size= 100 maxlength=100>
</td>
</tr>
<tr>
<input type=submit name=Submit value=提交>
<input type=reset name=Reset value=取消>
</tr>
</table>
</form>
</body>
</html>
第二个JSP:
<%@ page language="java" contentType="text/html;"
pageEncoding="gbk"%>
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<%
String pinpai = request.getParameter("pinpai");
byte tt[]=pinpai.getBytes("gbk");
pinpai=new String(tt);
String zhi = request.getParameter("zhi");
String price = request.getParameter("price");
String buy = request.getParameter("buy");
String buyed = request.getParameter("buyed");
String yi = request.getParameter("yi");
out.println("调查的结果是:1."+pinpai+"<br>2."+zhi+"<br>3."+price+"<br>4."+buy+"<br>5."+yi);
%>
</body>
</html>
接收后全是?
不能显示汉字?
如下:调查的结果是:1.??????
2.????
3.????
4.???ò??
5.
<%@ page language="java" contentType="text/html; charset=gbk"
pageEncoding="gbk"%>
<html>
<head>
<title>Mp3调查</title>
</head>
<body>
<form name=myform method=post action="ExamineResult.jsp">
<table border = 0 align = center>
<tr>
<td><div>1.你是否听说过该品牌?</div></td>
</tr>
<tr>
<td>
<input type=radio name = pinpai checked value = 听说过>听说过<br>
<input type=radio name = pinpai value = 没有>没有
</td>
</tr>
<tr>
<td><div>2.您认为该产品的质量怎么样?</div></td>
</tr>
<tr>
<td>
<input type=radio name = zhi checked value = 很好>很好<br>
<input type=radio name = zhi value = 一般>一般<br>
<input type = radio name = zhi value=好>好<br>
<input type = radio name= zhi value = 差>差
</td>
</tr>
<tr>
<td><div>3.您认为该产品的市场价格怎么样?</div></td>
</tr>
<tr>
<td>
<input type=radio name = price checked value = 太高>太高<br>
<input type=radio name = price value = 高>高<br>
<input type = radio name = price value=合适>合适<br>
<input type = radio name= price value = 偏低>偏低<br>
<input type = radio name = price value=特低>特低
</td>
</tr>
<tr>
<td><div>4.您是否购买过该产品?</div></td>
</tr>
<tr>
<td>
<input type=radio name = buy checked value = 购买过>购买过<br>
<input type=radio name = buy value = 没有>没有
</td>
</tr>
<tr>
<td><div>5.您是否以后会购买该产品?</div></td>
</tr>
<tr>
<td>
<input type=radio name = buyed checked value = 会>会<br>
<input type=radio name = buyed value = 不会>不会
</td>
</tr>
<tr>
<td><div>6.对产品的建议</div></td><br>
<td>
<input type = text name = yi value="" size= 100 maxlength=100>
</td>
</tr>
<tr>
<input type=submit name=Submit value=提交>
<input type=reset name=Reset value=取消>
</tr>
</table>
</form>
</body>
</html>
第二个JSP:
<%@ page language="java" contentType="text/html;"
pageEncoding="gbk"%>
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<%
String pinpai = request.getParameter("pinpai");
byte tt[]=pinpai.getBytes("gbk");
pinpai=new String(tt);
String zhi = request.getParameter("zhi");
String price = request.getParameter("price");
String buy = request.getParameter("buy");
String buyed = request.getParameter("buyed");
String yi = request.getParameter("yi");
out.println("调查的结果是:1."+pinpai+"<br>2."+zhi+"<br>3."+price+"<br>4."+buy+"<br>5."+yi);
%>
</body>
</html>
接收后全是?
不能显示汉字?
如下:调查的结果是:1.??????
2.????
3.????
4.???ò??
5.