I\'ve done tutorial about Facelets templating.
Now I\'ve tried to create a page that isn\'t in same directory as the template. I\'ve got problems with page style, b
Suppose that you are running the in the sub directories of the web application. You may try like this :
The '${facesContext.externalContext.requestContextPath}/' link will help you to return immediately to the root of the context.
In relative URL's, the leading slash / points to the domain root. So if the JSF page is for example requested by http://example.com/context/page.jsf, the CSS URL will absolutely point to http://example.com/styles/decoration.css. To know the valid relative URL, you need to know the absolute URL of both the JSF page and the CSS file and extract the one from the other.
Let guess that your CSS file is actually located at http://example.com/context/styles/decoration.css, then you need to remove the leading slash so that it is relative to the current context (the one of the page.jsp):