<html-el:img page="${obj.path}">

or

<img src="<c:url value="${obj.path}" />">

or

<html:img page="<%= obj.getPath() %>">

depending on what you dig.

alternatively you could have an action that returns an image from a request

<html:img page="/image.do" name="obj">

which may render to something like
/myapp/image.do?path=/images/foo.gif&name=fooImage

depending on the properties of you object (this example getName() and getPath()). There are other attributes you can use to use fewer parameters, see docs.

for this you'd need to have an action that returns null as a forward but writes an image to the response. I'd go with the first options.

On 29 Mar 2004, at 17:13, Daniele Santanche' wrote:

I have to create a page in which I display information of a collection of
objects. Each object has it's own image which I want to render near the
details of the object. For these purpose I'm trying to use the html:img tag,
which seems to be able to render images dynamically, but I don't understand
how it works.
What I need in the resulting HTML page is:


<img src=<the object image file name> >

How can I do this with the tag <html:img>?

Thanks.
    Daniele






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