title: retrieve dropdown list from mysql database and insert to database in jsp
body: <p>This thing is really bothering me. How can I get my dropdown list from MySQL database and then submit it to another table in JSP. I only know how to create a static dropdown with html   and  but how can I make it dynamic. I am thinking of a form that links to a servlet and the servlet connects to the database and fetches an array of strings from a database table and then sends it to the JSP to populate the  options and when an option is submitted, it send to a servlet which then inserts to the database. someone please give me some sample code that can do this. Most specifically I need the code of the JSP used in the  tag and the code for sending from the servlet. I've really checked with google but there is no clear answer. Hope I get an answer here</p>