spring mvc 框架URL接收中文参数的乱码解决方案

来源:互联网 发布:英雄杀这次探宝数据 编辑:程序博客网 时间:2024/06/05 08:02

在传值过程中,经常会碰到中文乱码的问题,处理我上篇文章中在web.xml中加入过滤器之外,还有一种更彻底的方法:

配置tomcat目录下的service.xml文件

tomcat7/conf/server.xml

给该行代码加上 URIEncoding=”UTF-8” 的编码属性

   <Connector port="8080" protocol="HTTP/1.1"               connectionTimeout="20000"               redirectPort="8443" URIEncoding="UTF-8"/>
阅读全文
0 0
原创粉丝点击