Re: Supporting JSTL functions as well in FreemarkerServlet?

Woonsan Ko <[email protected]> Sat, 09 Aug 2014 11:36:48 -0400
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
Hi Daniel,

Thank you very much for your quick response!

I've just checked again what JSP 2.1 Specification says in section
JSP.2.10. It says "functions are mapped to public static methods in Java
classes. In JSP, the map is specified in the TLD.", "the specified
method must be a public static method in the specified class, and must
be specified using a fully-qualified return type followed by the method
name, followed by the fully-qualified argument types in parenthesis,
separated by commas", and "the resulting value is the value returned by
the method evaluation, or null if the Java method is declared to return
void." [1]

So, yes, they are just static methods and there's no other additional
requirements.

Also, thanks for the tips on where to look for contribution. I'll  try
to create a patch keeping BC. I'll create a ticket and attach my patch
later in https://sourceforge.net/p/freemarker/bugs/ for reviews.

Kind regards,

Woonsan

[1] https://jcp.org/aboutJava/communityprocess/final/jsr245/

On 8/9/14 9:21 AM, Daniel Dekany wrote:
> Hi,
> 
> Are JSTL functions always just plain static methods, or do some of
> them have some additional requirements? Because if they are just
> static methods, then FreeMarker could certainly easily support them.
> It should be implemented inside freemarker.ext.jsp. Contributions that
> keep backward compatibility are highly welcome (will need to sign a
> typical Contributor License Agreement)!
> 


-- 
[email protected]     www.onehippo.com
Boston - 101 Main Street, Cambridge, MA 02142
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466

------------------------------------------------------------------------------