But this is a JSP question.. I am using it with the Struts 2 framework but this has nothing to do with the struts framework . Therefore, I thought it to be a JSP question and hence posted it in the JSP forum.
JSP question? Well, normally in JSP with the EL the name of the variable would be simply
But for some reason you've thrown some scriptlets in there. Normally in JSP with the <c:forEach> element you'd use the varStatus attribute to give you a variable which you can get the index number from, so you shouldn't need a scriptlet.
But you aren't using <c:forEach>. You're using a Struts iterator. So your Struts question is "How do I get a value which represents the number of times the code has been through the loop from an <s:iterator> element?"
So it's a Struts question.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads