1 .打开tomcat的server.xml文件,找到区块,加入如下一行:URIEncoding="gbk" >
<Connector port= "8080 " protocol= "HTTP/1.1 "
connectionTimeout= "20000 "
redirectPort= "8443 " URIEncoding="GBK"/>
2. <%=new String(request.getParameter("name").getBytes("ISO-8859-1"),"GBK")%>