Re: Struts2 or JSF?



Lew wrote ...
[ SNIP ]
Lately I'm having trouble combining JSF and JPA (Java Persistence API)
to retrieve images (JPGs, PNGs) from a database for display in an
image tag in the JSP. I haven't figured out what I'm doing wrong yet,
but I think I'm interfering with the JSF lifecycle. The debugger
tells me that the image content (byte array) is pumping to the
response's output stream, but nothing displays in the browser.
[ SNIP ]

Arved Sandstrom wrote:
Have you tried the image servlet approach? http://balusc.blogspot.com/2007/04/imageservlet.html#ImageServletServingFromDatabase

I had an image servlet but it lacked the 'response.reset()'. Thanks.

My servlet had worked with a straight JSP / JDBC approach so it was quite the mystery.

--
Lew
.



Relevant Pages