Marc,

That's a tricky one I've planned for but haven't started yet.  My research
showed the html:img tag should be used with a path.  That path can invoke an
action (direct, not tiled) that sets the content-type to the right type of
image then tosses out the binary stream. So, it should be something like
this:

html:write get a URL such as "/images.do?id=555" or
"http://somehost/images.do?id=555";.  Then your map an action for "/images"
to set the content type, open the database, and print the binary stream
appropriately.  Sounds a bit list an advertising program, almost. :)

If something else works for you, please let me know as this is type of image
display is on my to-do list.

Regards,
David

-----Original Message-----
From: Marc AMIR-TAHMASSEB [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 11:50 AM
To: Struts Users Mailing List
Subject: Dynamic Image from DB to JSP


Hi,

I have an image in my Database and I want to display it.
Before creating the jsp, I ask the image from the DB and put it in my
modele (like a InputStream property named photo in an Employe class)
In my JSP i want to display this image (so the property)
Is it possible to give a "binary" directly to the html:img tag ?
Can i write <html:img src="employe.getPhoto()"/>

Thank's

Marc


---------------------------------------------------------------------
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