Thanks for responding. Thats what they have tried here before when they used JSP+Struts+ ADFBC. Now we are using JSF, for which I was hoping there would be a way where i could avoid the servlet and call it through my backing bean. I was successful in getting my image but isn't there a way i can get my displayFile() method to redirect the image to my desired
jsp. Perhaps somehow i could mention it in my faces-config.
HttpServletResponse response = (HttpServletResponse) extContext.getResponse();
response.setContentLength((int) length.intValue());
response.setContentType(CONTENT_TYPE);
// response.setHeader("Pragma","no-cache");
// response.setHeader("Cache-Control","no-cache, post-check=0, pre-check=0");
//response.setHeader("Cache-Control","no-store" );
response.setDateHeader("Expires", 0);
try {
InputStream in = blobDomain.getBinaryStream();
OutputStream out = response.getOutputStream();
byte[] buf = new byte[1024];
int count;
while ((count = in.read(buf)) >= 0) {
out.write(buf, 0, count);
}
in.close();
out.flush();
out.close();
facesContext.responseComplete();
I am sorry if i am pressing it. I was just hoping JSF had a way to do it.
Sudha