I am creating an online test application using struts framework. In the jsp page i am using display tag to navigate through the questions. i can able to display one question with 4 options per page. here is my code.
<form method="get">
<display:table name="${sessionScope.questionList}" id="quest" pagesize="1"
requestURI="display.jsp">
<display:column title="Stuff">
<c:out value="${quest.quesId}"/><br/>
<c:out value=" ${quest.question}"/><br/>
<input type="checkbox" name="ans1" value="${quest.option1}" /> <c:out value="${quest.option1}"/><br/>
<input type="checkbox" name="ans2" value="${quest.option2}" /> <c:out value="${quest.option2}"/><br/>
<input type="checkbox" name="ans3" value="${quest.option3}" /> <c:out value="${quest.option3}"/><br/>
<input type="checkbox" name="ans4" value="${quest.option4}" /> <c:out value="${quest.option4}"/><br/>
</display:column>
</display:table>
</form>
My problem is, in page 1 if a user selects one checkbox option and go to to the next page, that checkbox is unticked when he comes back to that page and viceversa. how can i solve this problem ? please help me regarding this.
Thanks in advance