Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

retrieve image from directory in jsf

 
muntago Richard
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just use world/test.jpg. there is no need to give the whole url.
 
Brendan Healey
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic