0

I want to display an image in the webpage. I added the following code to the webpage:

<h:graphicImage 
   value="D:\\ShopCart\\WebContent\\resources\\images\\WNewClothing\3.png"/>

When i run it in the eclipse browser i could see the image, but when i run it on the mozilla , the image was not being displayed. Why is it so? Can somebody provide me a solution to this problem? I also changed the 'value'to 'name', but the problem remains same.

Shruthi
  • 325
  • 7
  • 27
  • 1
    You have incorrectly assumed that mentioning the full disk file system path would serve images/resources stored in that location. See [here](http://stackoverflow.com/a/11988418/1391249) for the way how is accomplished in JSF way. (Do not rely upon non-standard, "eclipse browser", by the way). – Tiny Aug 31 '15 at 07:25
  • I think you forgot a \ before the 3.png – Stéphane Eintrazi Aug 31 '15 at 07:28

0 Answers0