[jsr-314-open-mirror] [jsr-314-open] outputStylesheet generates URLs that can't load url(...) in CSS
Cay Horstmann
cay.horstmann at gmail.com
Mon Sep 13 05:37:16 EDT 2010
CSS files commonly contain url(...) expressions such as
.ui-icon { width: 16px; height: 16px; background-image: url(myicon.png); }
These don't work when the CSS file is loaded with
<h:outputStylesheet library="styles" name="skin.css"/>
This discussion explains the problem:
http://forums.sun.com/thread.jspa?threadID=5447194.
It's pretty unsatisfactory that a tag named output*Stylesheet* can't
properly output a style sheet.
One remedy would be for JSF to parse the CSS and rewrite the URLs,
another to have h:outputStylesheet generate a better URL, such as
/context path/javax.faces.resource/styles/skin.css
instead of
/context path/javax.faces.resource/skin.css.xhtml?ln=styles
I realize that the latter would require a spec change in
http://download-llnw.oracle.com/javaee/6/api/javax/faces/application/Resource.html#getRequestPath%28%29
Is this something that is within the scope of JSF 2.0 maintenance? If
not, is there a place to post requests for where the JSF 2.next
expert group will find it?
Thanks,
Cay
More information about the jsr-314-open-mirror
mailing list