tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Buckley" <briankbuck...@comcast.net>
Subject Re: how to use methods with parameters
Date Thu, 05 Feb 2004 20:57:20 GMT
> > is it possible to use JSTL for an expression like
> >
> > <%=calculateDays(startDate, endDate) %> ???
> >
> >
> > probably not, but I am too new to JSTL to figure it out by myself. Could
> > someone advise me?
>
> This could be possible through an EL function (introduced in JSP 2.0).
> The syntax would be as follows:
>
>   ${acme:calculateDays(startDate, endDate)}
>
> You'd have to define in one of your classes a static method
"calculateDays" with the proper
> signature (Date, Date). The name, class, and signature would then have to
be defined
> within a <function> element in a TLD.

This ability to define static functions for use in JSP 2.0 is/will be a
great, very useful improvement to JSP.

But what about for non-static methods - is it possible to do something
similar but with non-static functions?

-Brian


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message