I've problems displaying images in my index.xhtml file.
I want the link from my database to point to the image file so that a <h:graphicImage/>
or <img />
tag can display it. Currently using localhost only.
I've managed to save an image to c:\var\webapp\images\ and also added <property name="alternatedocroot1" value="from=/images/* dir=/var/webapp" />
to my glassfish-web.xml and using:
<h:graphicImage value="#{entity.imageLink}" />
<img alt="#{entity.title}" src="#{entity.imageLink}" />
But I never manage to display any images! What should be written in my database to display imageExample.jpg which is saved in c:\var\webapp\images\imageExample.jpg? My thought is that the problem lies in my path but I might very well be wrong.