Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to insert value and name from HTML form using servlet  RSS feed

 
tangara goh
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello expert,

I have this html code which has a name and a value, as below:



My question is how do I insert the value into my database ?

Right now, I can only manage to use getParameterValues to read in the name and insert.
How do I get the servlet to read in the value as well as the name and insert into my database?

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37051
507
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What type of database field are you trying to insert into? What is an example of valid data for that field/table?
 
Les Morgan
Rancher
Posts: 767
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
post to your servlet page, then use the I/O features to insert to the DB.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!