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

#20539

xuzhike
Participant

Hi, Christian,

after removing @ManagedProperty(value=”#{param.jsfParam}”) and URIEncoding=”UTF-8″ in server.xml.

pretty-config.xml

<url-mapping id=”fileUpload”>

<pattern>/fileUpload/#{query1:testView.query1}</pattern>

<view-id>/ui/test/fileUpload.xhtml</view-id>

<query-param name=”jsfParam”> #{testView.jsfParam} </query-param>

</url-mapping>

for english params in xhtml:

<pretty:link mappingId=”fileUpload”>

<f:param value=”param1″ />

<f:param name=”jsfParam” value=”param2″ />上传文件

</pretty:link>

both really can be injected into Bean and URL is corret

http://localhost:8080/echaoshi/fileUpload/param1?jsfParam=param2

but if f:param is non-english, for my test, chinese:

<pretty:link mappingId=”fileUpload”>

<f:param value=”上传文件” />

<f:param name=”jsfParam” value=”上传文件2″ />上传文件

</pretty:link>

both is NOT correct:

http://localhost:8080/echaoshi/fileUpload/%20%87%F6?jsfParam=%E4%B8%8A%E4%BC%A0%E6%96%87%E4%BB%B62

maybe something missing. I will try again.