Hi Marius,

Check out the fn:length() function, this is what you are looking for.
size() is a method and you cannot call methods directly from JSTL (only
getters and setters), but the fn taglib provides a function for length
of Collections and strings. See the JSTL 1.1 documentation for more
information, but basically fn:length() is what you are looking for:

<c:out value="${fn:length(myList)}"/>

Hope this helps.

 -Christian

Marius Botha wrote:

>Hi there,
>
>Just a basic question. I am trying to print out the size() of a List, like
>the tag below.
>
><c:out value="${myList.size}"/>
>
>But I am getting the following error: "An error occurred while evaluating
>custom action attribute "value" with value "${myList.size}": The "."
>operator was supplied with an index value of type "java.lang.String" to be
>applied to a List or array, but that value cannot be converted to an
>integer. (null)"
>
>Can the c:out tag not print int's or is it that I am calling "size()" which
>does not have a getter/setter method? Please help.
>
>Thanks,
>
>Marius
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>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]

Reply via email to