Re: Problem with PrettyFaces and Primefaces

Splash Forums PrettyFaces Users Problem with PrettyFaces and Primefaces Re: Problem with PrettyFaces and Primefaces

#20256

You probably don’t need <rewrite> rules…

This is your problem:

<link href="css/styles.css" rel="stylesheet" type="text/css" />
<link type="text/css" rel="stylesheet" href="../admin/template/ui-darkness/skin.css" />
<script type="text/javascript" src="js/iepngfix_tilebg.js"></script>
<script type="text/javascript" src="js/iepngfix.js"></script>

These should all use absolute paths from the root of the server, and in fact, you should probably be using JSF2’s resource relocation feature instead:

<h:outputScript>

<h:outputStylesheet>

By specifying relative paths, the browser will attempt to load the files depending on the current URL, and when you add PrettyFaces, the current URL will not be the same as it was before…

You need something like this:

<link href="#{request.contextPath}/css/styles.css" rel="stylesheet" type="text/css" />
<link type="text/css" rel="stylesheet" href="#{request.contextPath}/admin/template/ui-darkness/skin.css" />
<script type="text/javascript" src="#{request.contextPath}/js/iepngfix_tilebg.js"></script>
<script type="text/javascript" src="#{request.contextPath}/js/iepngfix.js"></script>