Extracting Database to put information in to creation of form
posted 8 years ago
I was wondering how i would do the following:
The jsp creates checkboxes with the string that is in the database. eg say a,b,d are in the database and i want them to be the choices for the check boxes how would i do that?
Thanks in advance
You should be doing your DB access in a Java class, not a JSP (if that is what you are doing). Collect the DB results into a List or other collection. Pass that to the JSP for iterating using the JSTL and EL.