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:[EMAIL PROTECTED] Gesendet: Donnerstag, 5. Februar 2004 21:57 An: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]