tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <>
Subject Re: set Collection size
Date Thu, 05 Sep 2002 16:28:48 GMT
On Thu, 5 Sep 2002, David Geary wrote:

> It *might* change over time. Currently, the JSTL expression language 
> (EL) does not allow willy-nilly method access; however, the EA version 
> of JSP2.0 does for the moment.

Quick clarification:  JSP 2.0's expression language supports the
definition of functions, not real object-methods.  It doesn't allow access
to back-end Java methods without explicit configuration in a TLD.

This way, the type-abstractions of JSTL are preserved.  For instance, JSTL
1.1 could theoretically (no promises!) define a size() function that works
on all types over which <c:forEach> can iterate.  This couldn't be done if
we simply exposed arbitrary methods of objects, as in letting you access
size() directly through a Collection reference.

A corrolary of this is that the calls look like ${size(foo)}, as in
languages where functions are first-class stand-alone entities -- not
${foo.size()}, as in Java.

Shawn Bayern
"JSTL in Action"

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message