You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Samuel Rochas <sa...@andinasoft.com> on 2004/04/29 20:13:03 UTC

html:img define src dynamicly

Hello,

How can I define the src of an html:img dynamicly?

My bean has a property containing the filename, how can I put it in the 
src tag?

Thanx
Samuel

---  andinasoft SA - Software y Consulting  ---
Mariano Aguilera 276 y Almagro - Quito, Ecuador
Tel. +593 2 290 55 18 ---- Cel. +593 9 946 4046
---------  http://www.andinasoft.com  ---------


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: html:img define src dynamicly

Posted by Samuel Rochas <sa...@andinasoft.com>.
Hello there,

I'vesolved it like this, using the bean tag inside the html src tag:

<img src="<bean:write name='myBean' property='myProperty'/>" width="100" 
height="74">

Sincerly
Samuel

---  andinasoft SA - Software y Consulting  ---
Mariano Aguilera 276 y Almagro - Quito, Ecuador
Tel. +593 2 290 55 18 ---- Cel. +593 9 946 4046
---------  http://www.andinasoft.com  ---------


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: html:img define src dynamicly

Posted by Michael McGrady <mi...@michaelmcgrady.com>.
I have a solution you may or may not like for this on the Struts Wiki.  See 
StrutsCatalogEschewUrlForProtocol at 
http://wiki.apache.org/struts/StrutsCatalogEschewUrlForProtocol.

At 11:13 AM 4/29/2004, Samuel Rochas wrote:
>Hello,
>
>How can I define the src of an html:img dynamicly?
>
>My bean has a property containing the filename, how can I put it in the 
>src tag?
>
>Thanx
>Samuel
>
>---  andinasoft SA - Software y Consulting  ---
>Mariano Aguilera 276 y Almagro - Quito, Ecuador
>Tel. +593 2 290 55 18 ---- Cel. +593 9 946 4046
>---------  http://www.andinasoft.com  ---------
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>