Hi Elise,

Turned out I had some other issues which were preventing resolution of my bean.

I had wanted to use <html:img page=...
in order to be able to use an image ref relative to the application rather than
server root... so my image reference could be
"/images/myImage.gif" rather than "myApp/images/myImage.gif".  Do you know of
any other way to do this?

Cheers,
Jon

Elise Hobbelink wrote:

> Hi Jon,
>  Same here, no solution, but I found in the Struts Javadoc that there is
> still a "TODO" for the scr field to make it settable:
> http://jakarta.apache.org/struts/api-1.0/org/apache/struts/taglib/html/ImgTa
> g.html
>
> This is what I did:
> <img src="<bean:write name="afriend" property="imageUrl" filter="true"/>"
> alt="<bean:write name="afriend" property="firstName" filter="true"/>" />
>
> Not so pretty though... so if you found a better way, I am very interested.
>
> Elise
>
> -----Original Message-----
> From: Jon Ferguson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 14, 2002 1:36 AM
> To: Struts Users Mailing List
> Subject: Using the IMG tag dynamically
>
> Hey guys,
>
> I must be missing something.  I've got an ActionForm with a bean attribute
> "item"... which has an image name under a property.. say "item.imageName".
> I would like to use the image tag to use this image dynamically..
>
> <html:img page="/images/myImage.gif" alt="No Image Set."/>  works fine...
> but
> it's not dynamic..
>
> surely this is trivial... but what am I missing? ..it would be neat if I
> could
> treat it like the <html:text> tag... and just reference the property..
> <html:text property="item.imageName"......
> but I can't see how to do that.
>
> Thanks,
> Jon
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

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

Reply via email to