I am using velocity for email templates in my java/spring 3 app. How could I get the size of an ArrayList added to the model from within the template.
I've never used Velocity, but its VTL reference guide says that calling a method is done using $customer.getAddress() or ${purchase.getTotal()}. So I would use ${myArrayList.size()}.
$customer.getAddress()
${purchase.getTotal()}
${myArrayList.size()}
2.1m questions
2.1m answers
60 comments
57.0k users