在TOMCAT中request.setCharacterEncoding(encode)只能对POST方式的参数起作用,GET方式要靠server.xml中的URIEncoding来设置,URIEncoding="gb2312"时可以正确传输中文参数,但是文件名和路径不能用中文,URIEncoding="UTF-8"时可以使用中文文件名,却有无法GET中文参数,常用的转码没作用,真是郁闷!
RESIN就没这么讨厌的编码问题。
RESIN就没这么讨厌的编码问题。
解决方案 »
- TOMCAT服务器没有停止直接更新文件会不会出错
- struts 2 中action 向action 传值问题
- log4j.properties文件里设置输出的时间怎么跟我电脑的时间不同步? 好像行数也要差几行,这是怎么回事?
- utf8编码,url传递中文参数乱码,奇数个中文时乱码如何解决
- javascript验证问题
- 最新的JAVA专题论坛
- 如果不用session,我如何设置所有未经登陆的请求都转到login去啊?
- 请教一个加密算法,100分啦
- 模仿一个QQ空间动态的网址
- jsp中如何实现对密码的实时检查提示
- 请教:使用iReport+JasperReports+struts 出现的问题
- 高分求教!javabean之间引用问题!急!!
This specifies if the encoding specified in contentType should be used for URI query parameters, instead of using the URIEncoding. This setting is present for compatibility with Tomcat 4.1.x, where the encoding specified in the contentType, or explicitely set using Request.setCharacterEncoding method was also used for the parameters from the URL. The default value is false.
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
我试着把它设置为true试试。