Absolutely it works. I am using it in my web application. This is a little example, and it works.
#foreach($vocepadre in $vociprimo)
.... some lines......
<table width="100%">
<tr>
#foreach ($vocefiglio in $vocisec)
#if ($vocefiglio.idClassePadre ==
$vocepadre.idClasse)
.....other lines ....
#end
#end
</tr>
</table>
#end
