Possible Duplicate:
Display image from database with p:graphicImage
I want to display a photo from its url stored in the database , so i used as follow
<h:panelGrid columns="1">
<p:graphicImage value="#{userController.photo}"/>
</h:panelGrid>
and the photo attribute is a url string that points to the photo location
public String getPhoto() {
String path = new File("").getAbsolutePath();
ph =ejbPhoto.find(current.getIdPhoto());
System.out.println("+PHOTO +++++++++++++++"+path+"\\"+ph.getPhotoName());
return path+"\\"+ph.getPhotoName();
}
the system.out.println shows the right path of the image but in the display page the photo is not displayed, So any idea ??