title: how can i display a dynamic photo in the user detail's page
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8207325/display-image-from-database-with-pgraphicimage">Display image from database with p:graphicImage</a>  </p>
  </blockquote>
  
  
  
  <p>I want to display a photo from its url stored in the database , so i used  as follow </p>
  
  <pre><code>                &lt;h:panelGrid columns="1"&gt;
                      &lt;p:graphicImage value="#{userController.photo}"/&gt; 
                  &lt;/h:panelGrid&gt;
  </code></pre>
  
  <p>and the photo attribute is a url string that points to the photo location</p>
  
  <pre><code>public String getPhoto() {
     String path = new File("").getAbsolutePath();
     ph =ejbPhoto.find(current.getIdPhoto()); 
     System.out.println("+PHOTO +++++++++++++++"+path+"\\"+ph.getPhotoName()); 
     return path+"\\"+ph.getPhotoName();
  }
  </code></pre>
  
  <p>the system.out.println shows the right path of the image but in the display page the photo is not displayed,
  So any idea ??</p>