Hai Sir, I want to interact with database in servlet program can you please give me an example
My task is i have to enter three fields using form namely employee_id, employee_name and employee_mobile number with a submit button By pressing the submit button the records which i have entered in the form is to be inserted in the database please help me sir
First, create a web page with an HTML form. Then, create a servlet. Make the action of the form on the web page refer to the URL of the servlet, so that the form is submitted to the servlet. Set the method attribute of form to "POST".
In the servlet, implement a doPost() method. Use request.getParameter(...) to get the information that's in the submitted form. Use JDBC to insert the information into a database.