Grails request parameters encoding issue in Tomcat

橙三吉。 提交于 2019-11-29 07:40:21

You need to add URIEncoding='UTF-8' to the Connector elements in conf/server.xml, e.g.

<Connector port='8080' protocol='HTTP/1.1' connectionTimeout='20000'
           redirectPort='8443' URIEncoding='UTF-8' />

This is described here: https://wiki.apache.org/tomcat/FAQ/CharacterEncoding

Viktor Nazarov
edit application.properties
add(update) line:
plugins.webxml=1.4.1
Igors23m

As fas as no final conclusion made, I'd like to share my expierence in the same situation. Here one can find more discussion.

I my case, I have dev environment under the windows on local pc including local MySQL. Production env - Centos 6, MySQL, Tomcat 6 behind Apache.

In dev environment - everything was o'k, but on production - no. The only thing that help me - was set autoreconnect=true&useUnicode=true&characterEncoding=UTF-8 additionally to recommendations both for Tomcat URIEncoding='UTF-8'

So, the problem was in correct settings java Driver for MySQL.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!