tomcat 的server.xml配置文件修改
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/>
这样get方式的中文参数传递到后台不会乱码。
post方式的中文参数在jsp中使用request.setCharacterEncoding("utf-8");
tomcat 的server.xml配置文件修改
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/>
这样get方式的中文参数传递到后台不会乱码。
post方式的中文参数在jsp中使用request.setCharacterEncoding("utf-8");