tags:

views:

23

answers:

1

I created an EL function that takes no parameters:

<function>
  <name>noArg</name>
  <function-class>com.example.customtag.function.PrintHi</function-class>
  <function-signature>java.lang.String noArg()</function-signature>
</function>

I invoke it as follows in a jsp:

<c:set var="myvar2" value="${ mytags:noArg() }"/> 
<c:out value="${myvar2}"/>

This works and produces the desired output in my browser (just returns a string). But Eclipse is telling me the above <c:set... is invalid. Specifically at mytags.noArg()

So I am wondering if this is the correct way to implement a noarg EL function.

Thanks.

+1  A: 

Yes, this is absolutely the correct way to implement such a function.

If it works, then don't worry about it. Eclipse's JSP validation is far from perfect.

Matt Ball