You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Vernon Smith <vw...@lycos.com> on 2003/11/23 07:23:01 UTC
How to work with a custom and a JSTL
Hi,
I have a custom tag which takes a output of a JSTL, or another custom tag as an attribute. This tag has one required and two non-required attributes. The following version doesn't work.
<mm:imagesizer src='<c:out value="${photopath}" />' alt="Photo" />
How to make it works? Is a nested tag a solution?
Thanks.
____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: How to work with a custom and a JSTL
Posted by Serge Knystautas <se...@lokitech.com>.
Martin Cooper wrote:
> 2) EL-enable the <mm:imagesizer> tag, so that you can specify the
> expression directly, like this:
>
> <mm:imagesizer src="${photopath}" alt="Photo" />
In JSP 2.0, you won't have to do anything special for this to work.. you
just need to have your custom tag handle runtime values.
--
Serge Knystautas
President
Lokitech >>> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: How to work with a custom and a JSTL
Posted by Martin Cooper <ma...@apache.org>.
On Sun, 23 Nov 2003, Vernon Smith wrote:
>
> Hi,
>
> I have a custom tag which takes a output of a JSTL, or another custom tag as an attribute. This tag has one required and two non-required attributes. The following version doesn't work.
>
> <mm:imagesizer src='<c:out value="${photopath}" />' alt="Photo" />
>
> How to make it works? Is a nested tag a solution?
It is not legal in JSP (or in XML, for that matter) to use a tag in the
value of an attribute. There are a couple of things you could do.
1) Specify the value for 'src' as the body of the <mm:imagesizer> tag,
instead of as an attribute value, like this:
<mm:imagesizer alt="Photo">
<c:out value="${photopath}" />
</mm:imagesizer>
2) EL-enable the <mm:imagesizer> tag, so that you can specify the
expression directly, like this:
<mm:imagesizer src="${photopath}" alt="Photo" />
--
Martin Cooper
>
> Thanks.
>
>
> ____________________________________________________________
> Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
> http://login.mail.lycos.com/r/referral?aid=27005
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org