Amarant,
In JSTL 1.0, the EL must be invoked explicitely by a tag that wants to support it.
This is what all the tags in the EL-based versions of the JSTL taglibs do,
and this is why it does not work by default with your custom tag.
When the EL is officially supported by the JSP spec (JSP 1.3), this will then
be handled transparently by the container.
In the meantime, if you really need to support the EL with your custom tags,
see the source code of the RI for examples, as well as class
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.
-- Pierre
Amarant Merah wrote:
>
> Hi,
>
> How to use the ${...} expression in our own taglib?
>
> I have this code:
> <c:set var="data1">Cambridge</c:set>
> <c:set var="data2">London</c:set>
> <mycustomtaglib:distance from="${data1}"
> to="${data2}"/>
>
> The problem is that within mycustomtaglib, the "from"
> attribute gets the value of String "${data1}" instead
> of "Cambridge". The same thing with data2.
>
> It works fine if it is used without ${...}
> <mycustomtaglib:distance from="Cambridge"
> to="London"/>
>
> Regards,
> Amarant
>
> =====
> Amarant Merah - survive, and fighting.
>
> http://www.sold.com.au - The Sold.com.au Big Brand Sale
> - New PCs, notebooks, digital cameras, phones and more ... Sale ends June 12
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>