在本地环境测试时使用jetty容器能正常收发url中文参数的值,但在线上tomcat容器环境时,无法正确获取url中文参数的值
日志中中提示以下记录:
解决思路:
对中文传值时需要先对中文进行两次URL编码,在接收时再进行一次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解码即可