What is the difference between the doGet and doPost methods?

methods
0
Posted

What is the difference between the doGet and doPost methods?

0

doGet is called in response to an HTTP GET request. This happens when users click on a link, or enter a URL into the browser’s address bar. It also happens with some HTML FORMs (those with METHOD=”GET” specified in the FORM tag). doPost is called in response to an HTTP POST request. This happens with some HTML FORMs (those with METHOD=”POST” specified in the FORM tag). Both methods are called by the default (superclass) implementation of service in the HttpServlet base class. You should override one or both to perform your servlet’s actions. You probably shouldn’t override service().

Related Questions