<% int idx = 0; %>
<c:forEach var="i" begin="0" end="23" varStatus="loopIndex">
<html:text name="myForm" property='<%= "txt[" + idx + "]" %>' />
<% idx++; %>
</c:forEach>
data = myForm/elements['txt[0]'].value;
for(icnt = 0 ; icnt < 5 ; icnt++){
data = myForm.elements['txt[' + icnt + ']'].value;
}