I am using struts 1.3. I have a jsp page with a question and set of answers. A code fragment is given below.
<c:forEach items="${TestForm.testQuestions}" var="var"
varStatus="status" step="1" begin="0">
<tr class="row">
<td>
<c:out value="${var.question}" />
<input type="hidden" value="<c:out value="var.qId"/>"
id="qstnId${status.index}">
</td>
<td><input type="radio" value="A" name="opt${status.index}">A</td>
<td><input type="radio" value="B" name="opt${status.index}">B</td>
<td><input type="radio" value="C" name="opt${status.index}">C</td>
<td><input type="radio" value="D" name="opt${status.index}">D</td>
</tr>
</c:forEach>
Is there any way I can get the questionid
(qstnId${status.index}
) and selected value
, store it in a formbean and validate in back end?