JSF Properties File for Images

I got a .war file where all my jsps are, including my JSF properties file that include a path(outside my .war file), for example:

urlWatermark=file:///C:/SA/images/watermark.jpg

Then in my JSP page:

<f:loadBundle basename="jsfks.bundle.image" var="msgImage" />

<c:set var="pageWater" scope="session"><h:outputText value="#{msgImage.urlWatermark}" />

</c:set>

<img src="${pageWater}" />

but it dont want to display my image, as when i view the source in the browser, it shows:

<img src="file:///C:/wesbankSA/images/watermark.jpg" />

how can i change this so that the image will display.

thanks

[695 byte] By [ITBoy2a] at [2007-11-27 5:45:47]
# 1
Use an ImageServlet. Googling using this keyword will provide enough examples, for example: http://www.google.com/search?q=ImageServlet http://balusc.xs4all.nl/srv/dev-jep-img.html
BalusCa at 2007-7-12 15:27:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks, so I have to write 2000 lines of code just to reference images, outside my war file, using a JSP props file?Isnt there a simpler way of doinig this
ITBoy2a at 2007-7-12 15:27:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

> so I have to write 2000 lines of code just to reference images, outside my war

> file, using a JSP props file?

No. Re-count the lines of the last given ImageServlet example (you may skip comments) and read the given examples how to use it.

> Isnt there a simpler way of doinig this

Yes, copypaste the ImageServlet code, change it where needed (at least the base path, the rest can be kept default), define this servlet in your web.xml, change your <img> or <h:graphicImage> tags to make use of it and run it.

BalusCa at 2007-7-12 15:27:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...