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

#20540

xuzhike
Participant

my test conclusion:

1:tomcat server.xml, add URIEncoding=”UTF-8″

2: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>

3: test file with chinese param:

<pretty:link mappingId=”fileUpload”>

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

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

</pretty:link>

result:

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

backend Bean:

15:01:08,140 INFO TestView:52 – TestView.setQuery1 = ????

15:01:08,140 INFO TestView:42 – TestView.setJsfParam = 上传文件2