Have a look at the DownloadAction sample app on this Wiki page:

http://wiki.apache.org/struts/StrutsFileDownload

In it you will find a sample app I wrote to demonstrate it, part of which
gets a BLOB field from a database (I think Oracle in this case, but it
should be portable with little or no change) and returns it to the
browser.

As for displaying it, what type of object are you returning?  If it's an
image, you can just call your DownloadAction from an img tag:

<img src="/myDownloadAction.do">

If it's a PDF, most people tend to just let it take over the page and have
the plug-in handle it.  There was a recent discussion about this though
that explained how you can display it in a portion of the page, there were
a couple of approaches... search the archives if that interests you.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Tue, August 9, 2005 2:31 am, C.F. Scheidecker Antunes said:
> Hello,
>
> Could anyone tell me how to fetch using a bean an image from a MySQL
> database blob field and displaying it on a jsp page?
>
> Thanks,
>
> C.F.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to