首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

解决tomcat地址栏传中文乱码的有关问题(转载)

2012-12-24 
解决tomcat地址栏传中文乱码的问题(转载)tomcat做web服务器时,通过地址栏传中文参数时,为防止浏览器上的为

解决tomcat地址栏传中文乱码的问题(转载)

tomcat做web服务器时,通过地址栏传中文参数时,为防止浏览器上的为乱码?
需在服务器server.xml中配置对应的端口中配置编码方式即可.例如:?

? ? <Connector port="8080"?
? ? ? ? ? ? ? maxThreads="150" minSpareThreads="25" maxSpareThreads="75"?
? ? ? ? ? ? ? enableLookups="false" redirectPort="8443" acceptCount="100"?
? ? ? ? ? ? ? debug="0" connectionTimeout="20000"?
? ? ? ? ? ? ? disableUploadTimeout="true"? useBodyEncodingForURI="true" URIEncoding="UTF-8"/>?

中加入useBodyEncodingForURI="true" URIEncoding="UTF-8"就可以了.

?

转载自:http://wangyong.iteye.com/blog/219675

热点排行