You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mohan Radhakrishnan <Mo...@hclcomnet.co.in> on 2002/11/17 14:27:58 UTC

Struts-el/JSTL/dynamic img

Hi,

Eddie bush wrote. From the archives
---------------
... 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. 
----------------
My question is. Is this valid ?
	<html:img src="${BEAN.property}"/>
Though we are using JSTL, we are assuming it is the same as the Struts-el.
Same engine ?
Our tag
<html:img src="${image.name}" width="730" height="350" border="0"
usemap="#Map"/>
generates
<img src="${image.name}" height="350" width="730" border="0" usemap="#Map">
Do you see something wrong here ?
Thanks,
Mohan






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts-el/JSTL/dynamic img

Posted by "David M. Karr" <dm...@earthlink.net>.
>>>>> "Mohan" == Mohan Radhakrishnan <Mo...@hclcomnet.co.in> writes:

    Mohan> Hi,
    Mohan> Eddie bush wrote. From the archives
    Mohan> ---------------
    Mohan> ... and if you happen to be able to use the JSTL ... David Karr wrote a
    Mohan> taglib for struts which should soon be in the contrib directory. It's called
    Mohan> Struts-EL, and it incorporates the JSTL's EL engine into the standard Struts
    Mohan> tags we all know and love. Using his taglib, you could do the following:
    Mohan> <html:img src="${BEAN.property}"/> Nice, eh? Search the archive for
    Mohan> "struts-el", and you're bound to happen across how you can get the taglib.
    Mohan> If you're stuck using the HTML <img src="..."> go with Martin's suggestion. 
    Mohan> ----------------
    Mohan> My question is. Is this valid ?
    Mohan> 	<html:img src="${BEAN.property}"/>
    Mohan> Though we are using JSTL, we are assuming it is the same as the Struts-el.
    Mohan> Same engine ?
    Mohan> Our tag
    Mohan> <html:img src="${image.name}" width="730" height="350" border="0"
    Mohan> usemap="#Map"/>
    Mohan> generates
    Mohan> <img src="${image.name}" height="350" width="730" border="0" usemap="#Map">
    Mohan> Do you see something wrong here ?

Normally, I would expect the tag to look like:

  <html-el:img src="${image.name}" ... />

because it's conventional to have a taglib line like:

  <%@ taglib uri="/WEB-INF/struts-html-el.tld"  prefix="html-el"  %>

However, if you used a prefix of "html" instead of "html-el", then that could
work, although it would be unconventional.

The fact that your attribute value isn't getting translated means that you're
either using the wrong prefix, or you didn't specify the correct taglib line.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net   ; SCJP



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts-el/JSTL/dynamic img

Posted by Dan Tran <da...@hotmail.com>.
Did you load tld file correctly in web.xml and declare struts-el in your jsp
file?

-Dan

----- Original Message -----
From: "Mohan Radhakrishnan" <Mo...@hclcomnet.co.in>
To: <st...@jakarta.apache.org>
Sent: Sunday, November 17, 2002 5:27 AM
Subject: Struts-el/JSTL/dynamic img


> Hi,
>
> Eddie bush wrote. From the archives
> ---------------
> ... 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.
> ----------------
> My question is. Is this valid ?
> <html:img src="${BEAN.property}"/>
> Though we are using JSTL, we are assuming it is the same as the Struts-el.
> Same engine ?
> Our tag
> <html:img src="${image.name}" width="730" height="350" border="0"
> usemap="#Map"/>
> generates
> <img src="${image.name}" height="350" width="730" border="0"
usemap="#Map">
> Do you see something wrong here ?
> Thanks,
> Mohan
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>