tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shanmugampl <>
Subject Grtting an Error while using forEach tag
Date Sat, 05 Jul 2003 08:54:10 GMT
Dear All,

      I am using forEach tag for iterating over an ArrayList present in 
the session scope. The code I have used is

<core:forEach var="image" items="${TREE-IMAGES}">

      When i execute this page I get the following error

An error occurred while evaluating custom action attribute "items" with 
value "${TREE-IMAGES}": Attempt to coerce a value of type 
"java.util.ArrayList" to type "java.lang.Long" (null

  But if I get the value and store it in a different name the forEach 
tag works properly. The changed code is

java.util.ArrayList list = 
session.setAttribute("IMAGES",list); %>
<core:forEach var="image" items="IMAGES">

  This works properly. Will there be a problem if there is a - in the 
variabe name or have i misunderstood something.

Shanmugam PL

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message