Advanced Customization > Info*Engine User’s Guide > Info*Engine Custom Tag Reference > Info*Engine Tags > Supplied Library Tags (JSTL) > forEach
  
forEach
This tag supports iteration over an iterable, group, or array of objects.
Syntax
<c:forEach var="VARIABLE" var="LIST">
<!-- invoked once for each element in LIST -->
</c:forEach>
Attribute Descriptions
Required attributes: list and var.
list
The list to iterate over. This must evaluate to an iterable, group, or array.
This attribute is required, and is also an expression.
var
The variable name to use for individual list elements during iteration. The value of var specifies the name of an implicit variable that is defined (and which must be unique within its scope within your task). In addition, a tasklet context variable is set with this name for each iteration so that it can be reused within other expressions. If the list being iterated over is an Info*Engine group, then the context variable is an Info*Engine element.
In addition to setting the variable, an element group named with the var attribute value is placed in the VDB (similar to the forEach tag functionality supplied with the Info*Engine core tag library).
Multi-valued attributes can also be iterated over using an expression such as ${myGroup[0]att[*]}. This attribute is required.
Example
<c:forEach var="one" list="${output}">
<log:info message="attribute A has a value of ${one[0]A[0]}" />
</c:forEach>