Re: bad encoding for f:param value in pretty-config

Splash Forums PrettyFaces Users bad encoding for f:param value in pretty-config Re: bad encoding for f:param value in pretty-config


Hey xuzhike,

Here are a few ideas I have regarding this issue:

1. Working on the encoding issues in PrettyFaces I figured out that Tomcat uses ISO-8859-1 as the default encoding for URIs. In my tests this broke German umlauts in query parameters. You can change the encoding by setting URIEncoding="UTF8" for the HTTP connector in your server.xml. This fixed the problems for me. See the Tomcat documentation for details:

2. I just committed some code to the PrettyFaces trunk that should fix the encoding issues for query parameters without the need to change the encoding for the connector. It would be great if you find some time to test the new snapshot in your application. Please not that my fix will only work if you let PrettyFaces inject the query parameter value by using the <query-param> element in your pretty-config.xml. I hope Hudson will deploy the new snapshot in the next minutes.

BTW: There are two possible sources of error in all this. On the one hand the links in the HTML page could be generated incorrectly and on the other hand the injection of the values from the HTTP request into your bean may be not correct. So you could also try to manually enter an URL containing critical characters into the browser bar to isolate the problem.

Thank you for all the testing! :-)