I am using struts2 with Velocity 1.5 and Velocity Tools 1.3. In my template I want to do a loop like:
#set ($count = ${item.qty})
#foreach($i in [1..$count])
${item.price}
...........
#end
${item.qty} is a BigDecimal but it seems like its passed to Velocity as a String maybe. Since this loop does not work. Replacing to $count = 5 works fine, and printing ${item.qty} gives me a result of 5. Velocity 1.5 and Tools 1.3 is the highest version Struts2 will support. Ideas? Workarounds? Thanks