This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Extracting Database to put information in to creation of form  RSS feed

 
Dean Chester
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
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
Dean
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, how you fetch and display the Database values?
 
krishna bala
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


take the values from DB, store in Collection , iterate collection on jsp .
 
Dean Chester
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By using a result set, yet i can only get it to display one and not the whole table.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!