Re: java.net.URISyntaxException: Illegal character in path at index 18

Splash Forums PrettyFaces Users java.net.URISyntaxException: Illegal character in path at index 18 Re: java.net.URISyntaxException: Illegal character in path at index 18

#20486

I took a look at this issue and it was a PrettyFaces bug. URLs containing spaces are not valid regarding RFC 2396 and so we cannot build an URI from them.

I fixed this and you can try if the latest snapshot of the development version works for you:

If you are using Maven, just set the version to 3.1.1-SNAPSHOT:

<dependency>
<groupId>com.ocpsoft</groupId>
<artifactId>prettyfaces-jsf2</artifactId>
<version>3.1.1-SNAPSHOT</version>
</dependency>

Please make also sure that you have the OcpSoft Maven Repository in your pom.xml:

<repository>
<id>ocpsoft</id>
<name>OcpSoft</name>
<url>http://ocpsoft.com/repository/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

You can also directly download the latest snapshot here.

If you don’t want to use the annotation support of PrettyFaces, you could also stay with the current stable version and disable the annotation scanning by adding the following to your web.xml:

<context-param>
<param-name>com.ocpsoft.pretty.BASE_PACKAGES</param-name>
<param-value>none</param-value>
</context-param>

If you have any other problems with PrettyFaces, please let us know! :-)