TOMCAT 处理方式:
1、打开Tomcat安装目录中的conf目录
2、修改server.xml中的connector一个子项,在其中添加URIEncoding="UTF-8" ,或者是其他的编码方式,变成如下:
- < Connector port = "8001" maxThreads = "150" minSpareThreads = "25" maxSpareThreads = "75" enableLookups = "false" redirectPort = "8443" acceptCount = "100" debug = "0" connectionTimeout = "20000" disableUploadTimeout = "true" URIEncoding = "UTF-8" />
WEBLOGIC 处理方式:
1.在web.xml中增加以下配置即可,编码也有可能为GBK,可根据自己的程序编码进行设置
- < context-param >
- < param-name > weblogic.httpd.inputCharset./* </ param-name >
- < param-value > UTF-8 </ param-value >
- </ context-param >