我是新手,目前正在编辑朋友的现有代码,我只是想知道是否有一种简单的方法可以在 JSTL/JSF 中为类似于此的 Java 代码执行嵌套 for 循环:
blocks=0;
for(vElement=0; blocks<19; vElement++){
for(hElement=0; exit<1; hElement++){
System.out.println(blocks);
if(blocks!=18){
blocks++;
} else{
exit = 1;
}
}
System.out.println("\n");
}
输出将是这样的:
0 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18
我在这里看到的一切都与 Backing Bean 有关(我真的不需要这个)。有什么建议么?