Re: 'URISyntaxException: Illegal character in path' on square brackets

Splash Forums PrettyFaces Users 'URISyntaxException: Illegal character in path' on square brackets Re: 'URISyntaxException: Illegal character in path' on square brackets

#21822

JonH
Participant

Attached is a webapp project I deployed under Tomcat 7.0.19. There’s a link on the index page that exercises:

http://localhost:8080/pf_uri-1.0/%5D||!

java.lang.IllegalArgumentException: java.net.URISyntaxException: Illegal character in path at index 20: http://localhost/%5D||!

com.ocpsoft.pretty.faces.url.URL.decodeSegment(URL.java:160)

com.ocpsoft.pretty.faces.url.URL.getDecodedSegments(URL.java:99)

com.ocpsoft.pretty.faces.url.URL.decode(URL.java:169)

com.ocpsoft.pretty.PrettyContext.<init>(PrettyContext.java:92)

com.ocpsoft.pretty.PrettyContext.newDetachedInstance(PrettyContext.java:177)

com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:83)

root cause

java.net.URISyntaxException: Illegal character in path at index 20: http://localhost/%5D||!

java.net.URI$Parser.fail(URI.java:2809)

java.net.URI$Parser.checkChars(URI.java:2982)

java.net.URI$Parser.parseHierarchical(URI.java:3066)

java.net.URI$Parser.parse(URI.java:3014)

java.net.URI.<init>(URI.java:578)

com.ocpsoft.pretty.faces.url.URL.decodeSegment(URL.java:148)

com.ocpsoft.pretty.faces.url.URL.getDecodedSegments(URL.java:99)

com.ocpsoft.pretty.faces.url.URL.decode(URL.java:169)

com.ocpsoft.pretty.PrettyContext.<init>(PrettyContext.java:92)

com.ocpsoft.pretty.PrettyContext.newDetachedInstance(PrettyContext.java:177)

com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:83)