使用springmvc redirect跳转地址时中文参数为空

来源:互联网 发布:java怎么调试错误 编辑:程序博客网 时间:2024/04/27 02:20
在本地环境测试时使用jetty容器能正常收发url中文参数的值,但在线上tomcat容器环境时,无法正确获取url中文参数的值
日志中中提示以下记录:
Character decoding failed. Parameter [name] with value [%u6d4b%u8bd5] has been ignored. Note that the name and value quoted here may be corrupted due to the failed decoding. Use debug level logging to see the original, non-corrupted values.

解决思路:
对中文传值时需要先对中文进行两次URL编码,在接收时再进行一次URL解码即可
阅读全文
0 0
原创粉丝点击