If I use
<h:graphicImage url="/resources/images/foo.gif"/>
it gets rendered as
<img src="/my-context/images/foo.gif" />
But, if I use
<h:graphicImage name="foo.gif" library="images"/>
it gets rendered as
<img src="/my-context/javax.faces.resource/foo.gif.jsf?ln=images" />
You get similar results for h:outputScript and h:outputStylesheet. What is the benefit of this second form? I don't see why it is needed to make resources relocatable. Is it just to make @ResourceDependency work? Or are there other benefits?
Just curious...
- Marty
http://www.coreservlets.com/JSF-Tutorial/jsf2/
[Message sent by forum member 'martyhall' ]
http://forums.java.net/jive/thread.jspa?messageID=371727