Re: parameter special characters are converting into junk characters.

Splash Forums PrettyFaces Users parameter special characters are converting into junk characters. Re: parameter special characters are converting into junk characters.

#23104

AFAIK arrays should work out of the box:

<url-mapping id="flightPlusHotel">
...
<query-param name="origin"> #{someBean.origin} </query-param>
...
</url-mapping>

With:

public class SomeBean
{
private String[] origin = String[] { "BLR", "LON", "SIG" };
}

But this would render to:

/vacation-packages/search?origin=BLR&origin=LON&origin=SIG

If you really want origin1..n instead of multiple origin parameters, you could either add multiple <query-param> tags to your xml like this:

<url-mapping id="flightPlusHotel">
...
<query-param name="origin1"> #{someBean.origin1} </query-param>
<query-param name="origin2"> #{someBean.origin2} </query-param>
<query-param name="origin3"> #{someBean.origin3} </query-param>
...
</url-mapping>

Or you could simply do the complete query parameter handling yourself. Just use a mapping without any query parameters like this:

<url-mapping id="flightPlusHotel">
<pattern value="/vacation-packages/search" />
<view-id value="/pages/package/flighthotel/flightPlusHotelResults.xhtml" />
</url-mapping>

And then use HttpServletRequest.getParameter*() methods to access the query parameters.