修改默认编码(ISO-8859-1)方法,修改根目录的conf下的server.xml,Connector元素添加URIEncoding=”UTF-8”属性,如下所示:
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" URIEncoding="UTF-8" redirectPort="8443"/>
2、new String(info.getBytes("iso-8859-1"),"UTF-8");
修改默认编码(ISO-8859-1)方法,修改根目录的conf下的server.xml,Connector元素添加URIEncoding=”UTF-8”属性,如下所示:
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" URIEncoding="UTF-8" redirectPort="8443"/>
2、new String(info.getBytes("iso-8859-1"),"UTF-8");