Ravindra Yadav
Ravindra Yadav

Reputation: 19

JSF View Param Issue while reading in GET URL

I am using JSF(Prime Faces 4.0 + Pretty Faces 3.3) <f:viewParam name="text" value="#{bean.property}" /> tag to read the param value from the below GET URL.

[http://testdomain:8080/text-abc%26123]

But I am getting only abc into bean.property. It seems %26 is getting converted into & before reading text value. How I can read value which has %26 (i.e & character) from the GET param value?

Upvotes: 0

Views: 184

Answers (1)

Luiggi Mendoza
Luiggi Mendoza

Reputation: 85779

The main problem isn't related to JSF at all, but you using %26 as part of a query string parameter. You should first understand that %26 means & based on Percent encoding used in URL encoding for Query Strings.

After knowing this, you should not pass any argument containing "%" directly on your query string. Looks like you have/need another way to sent the parameters to the site, like using cURL or another application that will encode the parameters in your query string properly.

Upvotes: 1

Related Questions