CSS and Images no longer display after applying URL rewriting

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


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

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


    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 />
    <p> <url-mapping id="admin"><br />
    <pattern value="/admin" /><br />
    <view-id value="/faces/pages/admin/admin_login.xhtml" /><br />
    <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.


    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?


    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:


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

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

Comments are closed.