CSS and Images no longer display after applying URL rewriting

Splash Forums PrettyFaces Users CSS and Images no longer display after applying URL rewriting

Tagged: 

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

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

    Ammar
    Participant

    I have configured PrettyFaces in my project as following.

    <br />
    <pretty-config xmlns="http://ocpsoft.org/prettyfaces/3.3.3"<br />
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br />
    xsi:schemaLocation="http://ocpsoft.org/prettyfaces/3.3.0 http://ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.3.xsd"></p>
    <p> <url-mapping id="login"><br />
    <pattern value="/login" /><br />
    <view-id value="/faces/pages/customer/login.xhtml" /><br />
    </url-mapping></p>
    <p> <url-mapping id="admin"><br />
    <pattern value="/admin" /><br />
    <view-id value="/faces/pages/admin/admin_login.xhtml" /><br />
    </url-mapping></p>
    <p></pretty-config><br />

    But it is not working fine.

    The problem is that, just the commandButton, outputText and inputText are shown. Rest of everything like background, graphics etc are not shown.

    #22668

    What do you mean with “not shown”? Sounds like your images and css files aren’t served any more, right? What error do you get if you request them from the server?

    #22669

    It is most likely that you used relative “../images/blah.png” paths to your images/styles. You should use absolute paths instead, or you should use the JSF2 resource relocation facility which was designed to handle exactly this scenario.

    You can see more potential answers for this question here:

    http://ocpsoft.org/support/topic/problem-with-prettyfaces-and-primefaces

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

You must be logged in to reply to this topic.

Comments are closed.