处理get请求中文乱码tomcat请求
修改tomcat中server配置:添加
URIEncoding="UTF-8"
<Connector port="8090" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8448" URIEncoding="UTF-8"/>
或者在接收后进行编码转换也是可行的:
deptName = new String(deptName.getBytes("iso8859-1"),"utf-8");