When you are using HTTP GET requests then you should use doGet() method whereas for HTTP POST requests, doPost() method is used. HTTP GET requests are idempotent whereas the HTTP POST requests are not idempotent. If an end-user has submitted POST form then the data will not get reflected into the URL but for GET form, the data will get reflected in the URL.