How do I reference a file inside the subfolder of the image library with JSF2.0?
I have tried many ways using the library and name tag but the most logical seems to be the one below, but it doesn't work!
<h:graphicImage library="images" name="Mecearia\4382982_med.jpg"/>
The server always returns
WARNING: JSF1064: Unable to find or serve resource, Mecearia\4382982_med.jpg, from library, images.
How can I solve this?
The URL path separator is /
, not \
.
<h:graphicImage library="images" name="Mecearia/4382982_med.jpg"/>
By the way, you're not using library
the right way. It should represent a "theme", not a duplication of whatever the <h:graphicImage>
(and <h:outputScript>
and <h:outputStylesheet>
) tag by itself already tells. If you don't have any (thus just the "default" theme), remove it and use
<h:graphicImage name="images/Mecearia/4382982_med.jpg"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With