wood burning stoves 2.0*
The moose likes JSF and the fly likes retrieve image from directory in jsf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "retrieve image from directory in jsf" Watch "retrieve image from directory in jsf" New topic
Author

retrieve image from directory in jsf

muntago Richard
Ranch Hand

Joined: Nov 13, 2010
Posts: 82
i have image test.jpg at folder
C:\workspace\project\WebContent\world

so i wants to dsplay it jsf. i have tried this two and nothing shows up




Avik Mazunder
Ranch Hand

Joined: Jun 27, 2012
Posts: 39

just use world/test.jpg. there is no need to give the whole url.
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218

If the image is not within the deployed project directory structure then you need to use a servlet like this:
http://balusc.blogspot.co.uk/2007/04/imageservlet.html

muntago Richard
Ranch Hand

Joined: Nov 13, 2010
Posts: 82
i think i have seen the problem. when i upload image to a folder in eclipse using servlets, the image gets uploaded to the folder but when i start the eclipse and tomcat server the image will not be in that folder directory loaded in eclipse.

consequently, if just copy and paste the image, the eclipse will load the image in that folder. what will i do

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: retrieve image from directory in jsf