您的位置:首页 > 编程语言 > Java开发

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

2017-12-07 19:23 351 查看
在本地环境测试时使用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解码即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐