chkal/pf-issue-test — Issue #9: Special character causing exception
Author: chkal
Created: 2012-03-06 07:14:42+00:00
State: open

Originally filed by **BlaineDo...@gmail.com** on 2009-04-13T23:10:12

Google Code issue: http://code.google.com/p/prettyfaces/issues/detail?id=6

What steps will reproduce the problem?
1. Create a query-param in the url-mapping that corresponds to a textbox
value submitted with a form
2. enter a '%' in the text box and submit

What is the expected output? What do you see instead?
I expected the form to submit as normal. Instead I receive a
PrettyException and IllegalArgumentException. Here's the output:

com.ocpsoft.pretty.PrettyException: PrettyFaces: Exception occurred while
processing mapping for query parameter
named URLDecoder: Incomplete trailing escape (%) pattern
com.ocpsoft.pretty.beans.ParameterInjector.injectQueryParams(ParameterInjector.java:78)
com.ocpsoft.pretty.beans.ParameterInjector.injectParameters(ParameterInjector.java:53)
com.ocpsoft.pretty.PrettyContext.injectParameters(PrettyContext.java:102)
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:59)

root cause
java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape
(%) pattern
java.net.URLDecoder.decode(URLDecoder.java:168)
com.ocpsoft.pretty.beans.ParameterInjector.injectQueryParams(ParameterInjector.java:72)
com.ocpsoft.pretty.beans.ParameterInjector.injectParameters(ParameterInjector.java:53)
com.ocpsoft.pretty.PrettyContext.injectParameters(PrettyContext.java:102)
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:59)

What version of the product are you using? On what operating system?
I'm using pretty faces 1.2.2 jar on a Mac OSX 10.5.6.