get请求中文乱码问题
Get中文乱码解决
Get请求类型:
<form action="${pageContext.request.contextPath}/addArtical.action" method="post"> onclick="window.location = '${pageContext.request.contextPath}/listArticle.jsp'" |
修改tomcat配置
Conf/server.xml
加URIEncoding="UTF-8"
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/> |
注意:tomcat8以上无需修改配置