Ok, I'm not knocking jdbc but for me using hibernate this is what my 
action class looks like .... 

public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        Long id = new Long(request.getParameter("imageId"));

        PropertyImage image = (PropertyImage) this.getPropertyImageService()
                .getImage(id);

        //session.save(propertyImage);
        OutputStream outputStream = response.getOutputStream();
        response.setContentType("image/jpeg");
        outputStream.write(image.getData());
        outputStream.flush();
        outputStream.close();

        //END NEW

        return null;
    }

I know I'm hung up on hibernate but I cant help it. 

--b


On Fri, 17 Sep 2004 11:06:45 -0400 (EDT), Frank W. Zammetti (MLists)
<[EMAIL PROTECTED]> wrote:
> One of the things I see asked very frequently on the Users mailing list is
> how to return PDF's and other BLOB fields from a database (or from a file
> system).  People either have trouble figuring out how to do it and require
> help, or have trouble making it work.
> 
> Please find attached source for a new Action called BLOBAction that I

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to