xgao (2) [Avatar] Offline
joshua.white (14) [Avatar] Offline
Re: confusion on page 80

This variable is created by the enclosing JSTL tag. This would have been more clear if the tag was defined like this:

<c:forEach var="member" items="${memberList}" varStatus="status">

When you specify the varStatus attribute, a scoped variable is created using the specified name. This variable is of type javax.servlet.jsp.jstl.core.LoopTagStatus and exposes several helpfull properties (current, index, count, first, last, begin, step, end) that describe the current state of the iteration. See the following link for more information:


Based on what I have read, there is no "default" value if this attribute is not explicitly specified. As a result, you may have found a bug/typo.

I hope this makes this more clear.


xgao (2) [Avatar] Offline
Re: confusion on page 80
Thank you Joshua

I have another question. the status.index is used
as a member.id to create the link.

<a href="member.do?id=${status.index}">

however, it seems to be the index of the current round of
the iteration. Is that the value of member ID?
bato (12) [Avatar] Offline
Re: confusion on page 80
Thanks for the hint.
In my test environment the link to member was not correct before I set the attribute varStatus="status"