Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc-servlet

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how i can i insert the data in the form of html form in
database through servlets.
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Retrieve the form data in your servlet using the getParameter, getParameterNames, and getParameterValues methods, it all depends on your needs. Connect to your DB, create your SQL statement using the retrieved values, update/insert these values into your database. You may want to check out the JDBC tutorial at Sun's site for some help.
Bosun
 
shams sh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will havew to use prepared statements to insert the vlaues of HTMl form into the database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic