In external style sheets of my current JSF project, there are hard-coded links to external resources like
.someId { background-image:url(/context/resources/i
You can use Expression Language (EL) along with the FacesContext to solve the issue. I use this technique frequently.
background-image: url('#{facesContext.externalContext.requestContextPath}/resources/images/background.gif');
This allows you to take advantage of JSF to provide dynamic content based on application input, or changes.
This technique works on JSF 1.2 and JSF 2.0