You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Jason W. Solinsky" <js...@sbsoft.com> on 2004/02/12 01:16:18 UTC
Problem with TLD for Zero argument EL functions
I am having difficulty getting jasper to handle an EL function with no
arguments.
I am using 5.0.16.
I declare the function in the TLD as follows:
<function>
<name>newList</name>
<function-class>com.sbsoft.common.web.el.CollectionFunctions</function-class>
<function-signature>java.util.List newList()</function-signature>
</function>
And it fails with:
2004-02-08 21:34:10,199 ERROR org.apache.jasper.JspC - ERROR-the file
'\WEB-INF\main\create.jsp' generated the following general exception:
org.apache.jasper.JasperException: The class specified in the method
signature in TLD for the function col:newList cannot be found.
Strangely, however, if I add a useless argument to the method of type
java.lang.Object and make no other changes, the following works fine:
<function>
<name>newList</name>
<function-class>com.sbsoft.common.web.el.CollectionFunctions</function-class>
<function-signature>java.util.List newList(java.lang.Object)</function-signature>
</function>
This results in numerous ugly calls of the form ${col:newList(null)}
Is this a bug? Does the spec forbid zero argument EL functions? (In which
case the error message leaves something to be desired). Is this my fault?
Thanks in advance,
JWS
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org