Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Values from ListBox to be inserted

 
Tontang Bei
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a web page that forwards listbox selected values to my servlet that receives it in a String Array. How would I insert this into a dbase? Is there some datatype in mysql that can help me with this? or should I format all the values into one String and then insert it normally?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Tontang Bei:
I have a web page that forwards listbox selected values to my servlet


That doesn't make much sense to me. If the page is being forwarded to a servlet, it will not yet have had a chance to be displayed in the browser, and so how would the selection be made?
 
Tontang Bei
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I mean after the user hits the submit button the values are extracted in a servlet
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, so it seems that from there you are confused as to how to save the values into a DB. So I've moved this post to a more approriate forum for such as discussion.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tontang,
Do you have a database already set up? If so, what does the schema/ddl/table structure look like?

If not and you get to design it, consider storing each listbox value in a separate row.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic