I want to ask you what is the best way to make a CRUD application with Servlet and JSP. I want to add, update, delete, list and also search for a student in a database. I will use Maven, Servlet, JSP, JSTL and JDBC with MySQL database.
I don't know exactly if I should use doPost() method for all operations or only for adding operation. I know that if I use doGET() method if I try to add a student in the database and then I click refresh button the student will be added multiple times, so the best way is to use doPost() and also sendRedirect() method.
But what should I use for the rest of the operations? I see some tutorials and some developers are using doGet() method, other developers are using doPost() and from this method are calling doGet() method. What is the best way? Thanks in advance!