How to reference JSF image resource as CSS background image url
When importing CSS stylesheets by <h:outputStylesheet>, the stylesheet is imported and processed by the FacesServlet through /javax.faces.resource/*. Look at the generated <link> element pointing to the stylesheet in question and you’ll understand. You have to change all url() dependencies to use #{resource[‘library:location’]} instead. JSF will then auto-substitute it with the right path. Given your folder … Read more