1、修改$tomcat_home/conf/server.xml,增加下面的加粗部分: URIEncoding="UTF-8"
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" />
2、执行下面命令,编辑本地语言环境
vi /etc/sysconfig/i18n
3、修改上面的i18n文件内容如下:
LANG="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_CTYPE="zh_CN.UTF-8"
LC_ALL="zh_CN.UTF-8"
4、执行下面命令,重新加载本地语言环境
source /etc/sysconfig/i18n
5、执行locale命令,验证本地环境是否已配置好,