tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Just Fun 4 You" <justfun4...@nexgo.de>
Subject AW: how to use methods with parameters
Date Thu, 05 Feb 2004 22:00:04 GMT
thanks to you all. Unfortunately I am stuck to JSTL 1.0 since I use Tomcat 4
with JSP 1.2. I am aware now that JSP 2.0 offers a lot improvements.
However, I do not feel very comfortable with the idea to setup static
methods for each el function. I am also very interested in the technical
aspects: why are not non-static methods supported?   

thx,



-----Urspr√ľngliche Nachricht-----
Von: Brian Buckley [mailto:briankbuckley@comcast.net] 
Gesendet: Donnerstag, 5. Februar 2004 21:57
An: taglibs-user@jakarta.apache.org
Betreff: Re: how to use methods with parameters

> > 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


---------------------------------------------------------------------
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