Service(), doGet(), doPost() difference

1. The service() method. If there is a service() method in the Servlet, the Service() method will be called first.

2. doGet(), if there is no service(), if it is a get request, call the get request processing method.

3. doPost(), if there is no service(), if it is a post request, call the post request processing method.

In summary, the browser calls get requests by default.

Guess you like

Origin blog.csdn.net/Sunshineoe/article/details/110853293