How to insert data into database in JSP
You need to learn: 1) How to create a web form so that a user can input database; 2) how to connect to database; 3) how to receive the values input in the web form using request.getParameter("xxx"); 4) how to prepare an insert statement with question marks; 5) how to fill the question marks with real values using pstatement.setString(), etc.
Source: https://www.roseindia.net/jsp/prepared-statement-query.shtml