JSF View Param Reading issue in GET URL

Splash Forums Rewrite Users JSF View Param Reading issue in GET URL

This topic contains 3 replies, has 2 voices, and was last updated by  Christian Kaltepoth 2 years, 6 months ago.

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

    ravindra
    Participant

    I am using JSF(Prime Faces 4.0 + Pretty Faces 3.3) <f:viewParam name=”text” value=”#{bean.property}” /> tag to read the param value from the below GET URL.

    https://localhost:8080/text-abc%26123

    But I am getting only abc into bean.property. It seems %26 is getting converted into & before reading text value.
    Please let me know how I can read value which has %26 i.e & character from the GET param value.

    Regards
    Ravindra

    #25806

    Hey, could you tell me which version of Rewrite/PrettyFaces you are using?

    And it would be great if you could create a minimal Maven project that reproduces this issue. This way I could dig into this issue. I messed quite some time with URL encoding and actually I think it is handled correctly in the recent versions of Rewrite.

    #25807

    ravindra
    Participant

    Hi christian,

    Am using pretty faces rewrite version 2.0.9.Final and prettyfaces-jsf2 3.3.3 ,primefaces 4.0.

    In forward slash issue in rewriting in URL.

    i constructed url like this https://localhost:8080/sample/text-ab&123,

    Bofore sending to pretty provider class i encoded url

    encoded url:https://localhost:8080/text-abc%26123

    when this url i configured in prettyConfigurationProvider class :

    .addRule(Join.path("sample/{filter}").to("sample.xhtml").withInboundCorrection());
    

    Now am getting in the browser correctly (https://localhost:8080/text-abc%26123)
    when path parameter settings to bean its giving only abc instead of abc@123.

    in web.xml i used following code

    <context-param>
         <param-name>defaultHtmlEscape</param-name>
         <param-value>true</param-value>
     </context-param>
    

    Please let me know how I can read value which has %26 i.e & character from the GET param value.

    Thanks& Regards
    Ravindra

    Thanks & Regards
    Ravindra

    • This reply was modified 2 years, 6 months ago by  ravindra.
    • This reply was modified 2 years, 6 months ago by  ravindra.
    #25819

    I’m not completely sure if this is caused by Rewrite. Does it work correctly if you remove the Join from your configuration?

    BTW: You don’t need to include prettyfaces-jsf2 in your dependencies if you are using Rewrite with the PrettyFaces integration module. See the the migration guide here:

    http://ocpsoft.org/rewrite/docs/migration/prettyfaces3

    A minimal Maven project would really be very helpful.

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

You must be logged in to reply to this topic.

Comments are closed.