Problem with # character in request parameters

Splash Forums PrettyFaces Users Problem with # character in request parameters

This topic contains 3 replies, has 2 voices, and was last updated by  jllado 5 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27359

    jllado
    Participant

    Hi,

    When I activate prettyfaces then I have the following error when trying to pass a request parameter with # character:

    java.lang.IllegalArgumentException: [/home.xhtml?agency=agt##2206] is not a valid URL fragment. Consider encoding relevant portions of the URL with [class org.ocpsoft.urlbuilder.util.Encoder]
    at org.ocpsoft.urlbuilder.AddressBuilder.create(AddressBuilder.java:89) ~[rewrite-addressbuilder-2.0.12.Final.jar:2.0.12.Final]
    at org.ocpsoft.rewrite.servlet.impl.HttpRewriteWrappedResponse.encodeRedirectURL(HttpRewriteWrappedResponse.java:377) ~[rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
    at org.apache.myfaces.context.servlet.ServletExternalContextImpl.encodeRedirectURL(ServletExternalContextImpl.java:385) ~[myfaces-impl-2.2.9.jar:2.2.9]
    at javax.faces.context.ExternalContextWrapper.encodeRedirectURL(ExternalContextWrapper.java:96) ~[myfaces-api-2.2.9.jar:2.2.9]
    at org.apache.myfaces.application.ViewHandlerImpl.getRedirectURL(ViewHandlerImpl.java:174) ~[myfaces-impl-2.2.9.jar:2.2.9]
    at org.apache.webbeans.jsf.ConversationAwareViewHandler.getRedirectURL(ConversationAwareViewHandler.java:89) ~[openwebbeans-jsf-1.6.2.jar:1.6.2]
    at org.ocpsoft.rewrite.faces.RewriteViewHandler.getRedirectURL(RewriteViewHandler.java:173) ~[rewrite-integration-faces-2.0.12.Final.jar:2.0.12.Final]
    at javax.faces.application.ViewHandlerWrapper.getRedirectURL(ViewHandlerWrapper.java:126) ~[myfaces-api-2.2.9.jar:2.2.9]
    at javax.faces.application.ViewHandlerWrapper.getRedirectURL(ViewHandlerWrapper.java:126) ~[myfaces-api-2.2.9.jar:2.2.9]
    at org.apache.myfaces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:185) ~[myfaces-impl-2.2.9.jar:2.2.9]
    at org.apache.myfaces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:122) ~[myfaces-impl-2.2.9.jar:2.2.9]
    at com.ocpsoft.pretty.faces2.application.PrettyNavigationHandler.handleNavigation(PrettyNavigationHandler.java:65) ~[rewrite-config-prettyfaces-2.0.12.Final.jar:2.0.12.Final]
    at org.ocpsoft.rewrite.faces.RewriteNavigationHandler.handleNavigation(RewriteNavigationHandler.java:64) ~[rewrite-integration-faces-2.0.12.Final.jar:2.0.12.Final]
    at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:140) ~[myfaces-impl-2.2.9.jar:2.2.9]
    at javax.faces.component.UICommand.broadcast(UICommand.java:120) ~[myfaces-api-2.2.9.jar:2.2.9]

    Any idea?

    I’m using latest version of prettyfaces:
    <dependency>
    <groupId>org.ocpsoft.rewrite</groupId>
    <artifactId>rewrite-servlet</artifactId>
    <version>2.0.12.Final</version>
    </dependency>
    <dependency>
    <groupId>org.ocpsoft.rewrite</groupId>
    <artifactId>rewrite-config-prettyfaces</artifactId>
    <version>2.0.12.Final</version>
    </dependency>

    Thanks!

    #27360

    Could you perhaps give 3.0.0.Alpha10 a try. Or even better the latest snapshots? I know that @lincoln has worked on some similar issue…

    #27361

    Some information about how to use the snapshots…

    https://github.com/ocpsoft/rewrite/wiki/Snapshots

    #27362

    jllado
    Participant

    I’m afraid I got the same error with the snapshot:

    java.lang.IllegalArgumentException: [/home.xhtml?agency=dit##266] is not a valid URL fragment. Consider encoding relevant portions of the URL with [class org.ocpsoft.urlbuilder.util.Encoder]
    	at org.ocpsoft.urlbuilder.AddressBuilder.create(AddressBuilder.java:89) ~[rewrite-addressbuilder-3.0.0-20151105.171214-75.jar:3.0.0-SNAPSHOT]
    	at org.ocpsoft.rewrite.servlet.impl.HttpRewriteWrappedResponse.encodeRedirectURL(HttpRewriteWrappedResponse.java:381) ~[rewrite-servlet-3.0.0-20151105.171309-72.jar:3.0.0-SNAPSHOT]
    	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.encodeRedirectURL(ServletExternalContextImpl.java:385) ~[myfaces-impl-2.2.9.jar:2.2.9]
    	at javax.faces.context.ExternalContextWrapper.encodeRedirectURL(ExternalContextWrapper.java:96) ~[myfaces-api-2.2.9.jar:2.2.9]
    	at org.apache.myfaces.application.ViewHandlerImpl.getRedirectURL(ViewHandlerImpl.java:174) ~[myfaces-impl-2.2.9.jar:2.2.9]
    	at org.apache.webbeans.jsf.ConversationAwareViewHandler.getRedirectURL(ConversationAwareViewHandler.java:89) ~[openwebbeans-jsf-1.6.2.jar:1.6.2]
    	at org.ocpsoft.rewrite.faces.RewriteViewHandler.getRedirectURL(RewriteViewHandler.java:183) ~[rewrite-integration-faces-3.0.0-20151105.171238-73.jar:3.0.0-SNAPSHOT]
    	at javax.faces.application.ViewHandlerWrapper.getRedirectURL(ViewHandlerWrapper.java:126) ~[myfaces-api-2.2.9.jar:2.2.9]
    	at javax.faces.application.ViewHandlerWrapper.getRedirectURL(ViewHandlerWrapper.java:126) ~[myfaces-api-2.2.9.jar:2.2.9]
    	at org.apache.myfaces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:185) ~[myfaces-impl-2.2.9.jar:2.2.9]
    	at org.apache.myfaces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:122) ~[myfaces-impl-2.2.9.jar:2.2.9]

    So is it a bug?

    Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Comments are closed.