Static url for all site

Splash Forums PrettyFaces Users Static url for all site

This topic contains 7 replies, has 2 voices, and was last updated by  Christian Kaltepoth 4 years, 11 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #18406

    lowolf
    Participant

    Hi!

    Why does not work this construction

    <url-mapping id=”root-users”>

    <pattern value=”/”/>

    <view-id value=”/root/users.html”/>

    </url-mapping>

    <url-mapping id=”root-users”>

    <pattern value=”/”/>

    <view-id value=”/root/user.html”/>

    </url-mapping>

    <url-mapping id=”root-users”>

    <pattern value=”/”/>

    <view-id value=”/root/tags.html”/>

    </url-mapping>

    pls help =(

    #22572

    Could you explain your usecase a little bit more. You mapped the root path of your webapp to different pages. There is no way for PrettyFaces to know which one to forward to if an corresponding request comes in.

    #22573

    lowolf
    Participant

    i wanna make root url for all pages

    #22574

    But how should PrettyFaces know which page to render?

    One possible way to achieve something like this is to use dynaview. Take a look at this chapter of the documentation for details:

    http://ocpsoft.org/docs/prettyfaces/3.3.2/en-US/html/Configuration.html#config.dynaview

    #22575

    lowolf
    Participant

    If i have more 30 pages, I have to half of the project = (Are there are any ideas?

    #22576

    Could you tell us a little bit more about your usecase and what you would like to achieve? Some details would be helpful here.

    #22577

    lowolf
    Participant

    I have site? where I use primefaces + JSF 2 + Spring Security 3.0.6. I need to make when loading login page displayed http://www.site.en not http://www.site.en / login.html followed suit, and all pages loaded with a URL http://www.site.en

    #22578

    In this case your only option is to use dynaview. Just create one single dynaview mapping in your pretty-config.xml with a viewId pointing to an EL method. This method then has to decide somehow, which page should be rendered. You could perhaps save the “current view” in the session and simply return this from the dynaview method.

    See the documentation for details:

    http://ocpsoft.org/docs/prettyfaces/3.3.2/en-US/html/Configuration.html#config.dynaview

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

You must be logged in to reply to this topic.

Comments are closed.