tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason W. Solinsky" <jsolin...@sbsoft.com>
Subject Problem with TLD for Zero argument EL functions
Date Thu, 12 Feb 2004 00:16:18 GMT
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


Mime
View raw message