Ignore case in prettyfaces pattern

Splash Forums PrettyFaces Users Ignore case in prettyfaces pattern

This topic contains 5 replies, has 3 voices, and was last updated by  Christian Kaltepoth 10 years, 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #18110


    if you defined a url mapping as follows:

    @URLMapping(id = "myPage", pattern = "/myPage", viewId = "/faces/pages/myPage.xhtml")

    if you tried to enter the url as:


    this will work fine, but if you changed the case to:


    or http:localhost:8080/MYPAGE

    it won’t work, it won’t find the page, so is there’s a way to ignore the case in the pattern, or such thing is not supported in PrettyFaces yet, if not supported, then please suggest a workaround.


    Why do you want to ignore case? Wouldn’t you rather have one valid URL, and make sure that all requests are transformed into that?

    <rewrite match="(?i)/mypage" toCase="uppercase" />



    i am using annotations, how to apply your solution in my case ?


    Use XML for this one rule, or set of rules :) They work together just fine.



    @lincoln Baxter III, when i tried to add above rule in my pretty-config.xml, i got the following error:

    cvc-complex-type.2.4.a: Invalid content was found starting with element ‘rewrite’. One of ‘{“http://ocpsoft.com/prettyfaces/

    3.3.0″:url-mapping}’ is expected.

    any ideas why ?

    and what does the (?i) before the page name means ?


    Is it an error from your IDE or does it happen at deployment time?

    The (?i) sets the CASE_INSENSITIVE flag for the regular expression.


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

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

Comments are closed.