Win a copy of Kotlin in Action this week in the Kotlin 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: 263
  • 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
Sheriff
Posts: 37241
519
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: 768
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!