Re: Problems with slash (/) and plus (+) in URL

Splash Forums PrettyFaces Users Problems with slash (/) and plus (+) in URL Re: Problems with slash (/) and plus (+) in URL

#20674

Plus signs are a special character in URLs used to represent spaces – I doubt you will be able to actually use a plus-sign unless you manually encode it first yourself (even that may not work.) It would be interesting if you could look in to this and figure out if PrettyFaces is doing something wrong, or if it’s a case that we *could* support – I don’t think we’ll be able to, but that’s just a guess.

In order to accept / as a value when mapping URLs, you’ll need to us a custom regex pattern in your path parameter:

<url-mapping id="catalog">
<pattern value="/catalog/#{ /.*/ path:navigationController.path}" />
<view-id>/catalog.jsf</view-id>
<action>#{shopcontroller.catalogController.showCatalog}</action>
</url-mapping>

This should do what you want, and capture all path segments into a single parameter. This is described in more detail in the docs: http://ocpsoft.com/docs/prettyfaces/3.2.0/en-US/html/Configuration.html#config.pathparams.regex

Hope this helps,

Lincoln