I have a set of chkboxes on a jsp page. These checkboxes values are givien from a db. So I call a loop to show checkboxes. Problem being, is tat on my other jsp page that I allow to modify it, I would like to use the most effcient way to show all the checkboxes and which ones were checked an unchecked from the last time. I will attempt to show some pusedocode just in case I lost anyone. add.jsp ******* 1. Loop that prints checkboxes and their values. 2. For gets send to servlet and inserts the ID of those that were checked modify.jsp ******** Needs to show all chckboxes with onyl the ones with reocrds in the db checked... Will this invlove 2 for loops or is their a better way?
I got your answers to the post but the # of checkboxes will be dynamic cause the values of the checkboxes are coming from the db, and some can get added to make more checkboxes. When I go to update, I still want all of my checkboxes to appear in the same place, ut I want some to seem checked and the other to be blank