This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes problem while using input type= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem while using input type="checkbox"" Watch "problem while using input type="checkbox"" New topic

problem while using input type="checkbox"

nageshreddy yakkanti

Joined: Jan 02, 2007
Posts: 1
i am trying to use the following code.

<c:forEach var="answer" items="${answers}">
<c:set var="i" value="${i+1}" />
<c:set var="bool2" value="answer.isCorrectAnswer.${i}"

<input type="checkbox" name="<cut
value="${answer.isCorrect}" />

i am not able to retrive the boolean value from answer.isCorrect into the checkbox.
i am getting the value for answer.isCorrect i have checked the same.

how should i proceed so that i can set the value in answer.isCorrect.

Thanks and Regards
I agree. Here's the link:
subject: problem while using input type="checkbox"
Similar Threads
create one checkbox per row for the JSP table
check boxes retrieving problem
How to retain the old values?
How to use array of beans in jsp
c:forEach question