How do I load an image from a DB inside a JSF page using managed beans?
问题 I have a database with some images. Could anyone explain me how I could load an image in a JSF page? I already have a managed bean that converts an Image object into a streamcontent. This streamcontent is called from the page in a tag <h:graphicImage> , but when I check the source code of the page, there's no src where the image could be loaded. 回答1: The JSF <h:graphicImage> get rendered as a HTML <img> element. Its src attribute should point to an URL, not to the binary contents. So you