webtier@glassfish.java.net

Re: Images, databases and jsf - how to make it work?

From: <forums_at_java.net>
Date: Fri, 6 Apr 2012 03:25:48 -0500 (CDT)

Uploading an image into the database is not such a big deal. However,
extracting it and displaying it in the database seems to be more of a
problem. I managed to extract an image from the database using the posting at
http://balusc.blogspot.de/2007/04/imageservlet.html. However, that only works
when I manually enter the Image URL in the address line of the browser, e.g.
http://localhost:8080/myapp/image?id=aeb3e5... Here, the servlet is being
called and the image is displayed stand-alone in the browser. If, however, I
try to include the image in a JSF site (e.g. ) it does not work for me. The
backing bean does extract the hash value (aeb3e5...) which is then rendered
e.g. in . However, I would like to have the servlet being called and thus
make JSF to return the JSF site along with the image. What could the problem
be? Is my understanding not correct in the sense that the server can render a
JSF site and include the binary stream in it?

--
[Message sent by forum member 'Stoney']
View Post: http://forums.java.net/node/883394