... and if you happen to be able to use the JSTL ... David Karr wrote a 
taglib for struts which should soon be in the contrib directory.  It's 
called Struts-EL, and it incorporates the JSTL's EL engine into the 
standard Struts tags we all know and love.  Using his taglib, you could 
do the following:

<html:img src="${BEAN.property}"/>

Nice, eh?

Search the archive for "struts-el", and you're bound to happen across 
how you can get the taglib.  If you're stuck using the HTML <img 
src="..."> go with Martin's suggestion.

Martin Cooper wrote:

>The example provided isn't quite right, because the quotes are incorrect.
>This will work:
>
>  <img src='<bean:write name="BEAN" property="property"/>'>
>
>The reason it works is because, as far as JSP is concerned, the HTML <img>
>element is just template text, not XML. You are correct that you cannot use
>a tag in the attribute value of another tag because of the rules of XML, so
>using the Struts tag instead, like this:
>
>  <html:img src='<bean:write name="BEAN" property="property"/>'/>
>
>does not work.
>
>--
>Martin Cooper
>

-- 
Eddie Bush




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

Reply via email to