and besides, you could use a struts2 action with result stream, but I'm not sure how to do it in struts 1 but the pattern is the same..
Amir Hossein Sharifzadeh-2 wrote: > > Dear J2ee members > I am trying to display an image in a jsp page which is stored as a blob in > the oracle table. > I wrote a stored procedure to get all the images for a particular id. > > and in the servlet(action), I wrote the following: > > code: > > > ResultSet rsImg = verServ.getImages(EtaId,conn); > while(rsImg.next()) > { > VDTO vadto = new VDTO(); > Blob Imgs = rsImg.getBlob("IMG"); > byte ImgData[] = Imgs.getBytes(1,(int)Imgs.length()); > vadto.setImgData(ImgData); > vadto.setImgs(rsImg.getBlob("IMG")); > ImagesLst.add(vadto); > } > request.setAttribute("images", > ImagesLst); > > > > I am passing the Arraylist as a request Attribute to the jsp page, from > where the Img tag calls a servlet passing the byte[]. > > Although I use Struts Framework, I would use jsp/struts tags for > displaying my image(s) in jsp > > Please guide me to write tags in jsp/struts for displaying my images. > > -- Best > Amir Hossein > > > > ----- Blog: http://www.ryanwong.name Can Use: English, Chinese -- View this message in context: http://www.nabble.com/Displaying-BLOB-image-in-a-jsp-page-through-struts...-tp19357020p19359500.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]