Reputation: 10094
We've got a weird problem while migrating our app from 1.3.7 to 2.0.0. Our app renders HTML that is viewed as UTF-8 encoded by our browsers.
When we enter a 'é' letter (code point : 00E9 / utf8 hex bytes : c3 a9) in an input and send it to a controller, we get back a c3 83 c2 a9
Request is well encoded (%C3%A9) but our params.field return what I've just said
Our 1.3.7 Grails app runs well on the same machine.
We have seen this problem which seems to be closed and upgraded webxml plugin to 1.4.1 but nothing changed.
We've found that Spring-Security-Core web.xml filter was declared before the CharacterEncodingFilter in the generated web.xml and tried to remove the plugin. It didn't help.
We've set up an hello world app with grails 2.0 with the same config, but it works
Does anybody knows what happens ?
Here is our application.properties
#Grails Metadata file
#Thu Jan 26 17:50:12 CET 2012
app.grails.version=2.0.0
app.name=plugin-web
app.servlet.version=2.4
app.version=0.1
plugins.hibernate=2.0.0
plugins.joda-time=1.3.1
plugins.resources=1.1.5
plugins.spring-security-core=1.2.7.1
plugins.tomcat=2.0.0
Upvotes: 0
Views: 285
Reputation: 10094
Ok, so it seems to be a timing issue
When we migrated the project to 2.0.0, grails installed the webxml 1.4.0 plugin for our project. Since then, it has been impossible for us, even by upgrading to the 1.4.1 version and cleaned the project several times, to make the project work as intended.
So, we got back to the backuped 1.3.7 version and upgraded to grails 2.0. Then grails installed the webxml 1.4.1 plugin and all worked fine. Note that downgrading to the 1.4.0 version made the problem show up again
Everything works fine, now. I don't know where grails-2.0.0 cached these links to the 1.4.0 version, since we cleaned the project, rm -rf'ed .m2, .ivy2, .groovy-ivy-cache (Everything... There was only the rm command left on the filesystem :-D ) but that's not my problem anymore
Upvotes: 1