This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hi i am working on a post resume and picture application and now i have picture and resume in database i wanna show the list of resumes with the pictures displayed in the list i know how to downlaod the picture but how to put tht in image tag
<html:img action="/myDownloadAction"> this will give me a link to the action page but how to receive image from database and display it in the list with pictures like the list of people who sent you scrap in orkut the picture of person is also there and my picture is in database
I have written code to do this in the past. Basically what you need to write is an action that will read the image from the database and stream the binary image back. You will then use the syntax that Merrill provided to call this action (it does not give you a link).
I have heard of the DownloadAction that is included with Struts but I have not used it (looks like since 1.2.6...I think I am using 1.1). If you are using 1.2.6 or newer, I suggest that you use DownloadAction. If you are using an older version I suggest that you download the 1.2.6 source code and look at how DownloadAction works. It is likely only about 20 lines of code.