Rewriting issue

Splash Forums PrettyFaces Users Rewriting issue

This topic contains 2 replies, has 3 voices, and was last updated by  Lincoln Baxter III 8 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #25548


    Hi sir,

    Am facing one issue

    i declared in pretty-config.xml

    <rewrite match=”/#{accountid}/#{title}/#{titleValue}” substitute=”/#{title}”/>

    <url-mapping id=”viewDetails”>
    <pattern value=”/o/viewDetails/#{accountid}/#{title}/#{titleValue}” />
    <view-id value=”/pages/viewDetails.xhtml” />

    Am getting error i.e.

    com.ocpsoft.pretty.PrettyException: Failed to parse PrettyFaces configuration from /WEB-INF/pretty-config.xml

    Please help me
    how cal i write dynamic rewrite rules?


    • This topic was modified 8 years, 1 month ago by  ravindra.

    You cannot use EL expressions like #{...} with <rewrite>. You have to use regular expressions instead:

    <rewrite match="/foo/(\w+)/" substitute="/bar/$1/" />



    You should probably take a look at Rewrite. It will allow you to create more dynamic rules:

    Specifically, you probably want to use the Join and/or Substitute configuration elements:

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

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.