Understanding GET and POST
GET : is used to get resource from the server:
Ex : Just change the method from post to get in the form and hit the URL.

Observation :

URL after submitting form :
1) All the parameters are sent as query parameters in the GET request.
2) Refresh the browser and the GET operation will have same effect , browser will not warn us.
POST : is user to create resource on the server:

Observation :

On Refreshing we got the confirm Resubmission message from the browser :

HttpServlet is a java specification :
Download Apache tomcat Doc : ( from source code distribution)

Extract it

Attach source : (Option will come when you try to open HttpServlet class )

Check all the methods of HttpServlet provided by Tomcat:

If we do not override doGet or doPost method then tomcat will call its own doGet or doPost methods.
Last updated
Was this helpful?