Reza,

You will have to create a servlet (or Action) that "streams" the image back from the database. Then, for the src of your img tag, you simply point to the servlet or Action.

Take a look at the Wiki page talking about the DownloadAction:

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

The sample app posted there shows how to do this (I'm not saying its the best approach to this problem, but it does demonstrate what your after, more or less).

Frank

Reza Ghaffaripour wrote:
Hi
i want to show an image in my jsp page. i DON'T want to user the image's
address (on the server's hard disk) and i want to get it directly from db
and set it to the form or something....

i also don't want to user ServletOutputStream outStream =
response.getOutputStream(); because it opens the image in a new page or it
wants to download it.

is there a way to send the image directly to src attribute of the img tag ?



--
Reza Ghaffaripour
www.rezaghp.com


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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

Reply via email to