<c:forEach> iterates over each item in the "items" parameter, and puts the item itself into the variable defined in "var". Therefore, while inside <c:forEach>, in your example "curItem" equals an element inside the lineitems array. So when the jsp:setProperty is run on the curItem variable, it's affecting one of the items inside lineitems, not lineitems itself.
In Java, the above code would be something like this:
Iterator i = lineitems.iterator();
Object curItem = i.next();
/* As you can see, in here curItem is an element of
lineitems. Note that jsp:setProperty uses reflection
to run the getter and setter methods on curItem. */
Hope this helps!