ITeye博客

struts

共 1 篇文章

JSTL中foreach标签varStatus

一直不太清楚varStatus中index 和count的用法,尤其是下边一段代码: [code="java"] ${i } ${status.index } [/code] status.index与count的输出结果是一样的。 查看了下源代码发现: [code="java"] public int getIndex() { return (index + begin); // our 'index' isn't getIndex() } public int getCount() { return (count); }[/code] 原来index的值是迭代的索引值+begin的。。

2009-12-02 12:23 · struts · Java