You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tito Eritja <ex...@e-inventa.net> on 2004/10/21 07:57:19 UTC

bean value within src of html:Image

How to use some bean value within a html:Image src?

I've tried something like <html:Image src="<%=bean.getValue()%>"/> but
it doesn't work, there's something like paramName and paramProperty of
html:link tag for html:Image?


thanks in advance

tito



Re: bean value within src of html:Image

Posted by David Farrell <df...@farrellconsultancy.com>.
The way I have done this is:

<img src="images\<bean:write name="beanname" property="imagename"/>">

and it works fine for my purposes.

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


Re: bean value within src of html:Image

Posted by dmu2201 <dm...@mail.ikasths.dk>.
Tito Eritja wrote:

>How to use some bean value within a html:Image src?
>
>I've tried something like <html:Image src="<%=bean.getValue()%>"/> but
>it doesn't work, there's something like paramName and paramProperty of
>html:link tag for html:Image?
>
>
>thanks in advance
>
>tito
>
>  
>

Why not use EL?! Then you could type:

<html:Image src="${bean.value}"/>

You just have to remember to type this:
  <%@ page isELIgnored= "false" %>
in the top of the JSP page.

That works for me...

Claus

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