Yes it is possible. Velocity templating supports for-in-for. as a result:
#foreach($i in $I)
#foreach($j in $J)
<p>i.getAttr() j.getAttr();</p>
#end
#end
PS in case you run into some problems, be sure your Velocity context contains actually what you want. (I failed because of that.)