File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes How to render BLOB data in jsf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of RabbitMQ in Depth this week in the Open Source forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to render BLOB data in jsf" Watch "How to render BLOB data in jsf" New topic

How to render BLOB data in jsf

Ajil Mohan

Joined: Feb 20, 2010
Posts: 8
Hi ,

I have to render an image in jsf page , which should be fetch from the data base. The data base which i am using is mysql. I got a suggestion that Servlet can be used for this purpose . But it didnt work here .The code which i try out is given below

<f:verbatim rendered="#{finMenuControlBean.imgCompForNonDiocese}">
<iframe src="/ImageServlet" frameborder="0" ></iframe>
public void doGet(HttpServletRequest request,HttpServletResponse response)..{
ServletOutputStream out;
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
out = response.getOutputStream();


please help me

SCJP 1.5
Prasad Kumbhare

Joined: Oct 18, 2007
Posts: 26
Please refer to this post. Did you try option suggested in there ?

Prasad Kumbhare
SCJP 5.0, SCWCD 5.0, SCBCD 5.0
I agree. Here's the link:
subject: How to render BLOB data in jsf