When we use doGet() method & when we use doPost() method in our servlet application?
doGet() method is used when we want to intercept on HTTP GET request. This is actually used to preprocess a request like getting the data from dtatbase and displaying it on html page.
doPost() method is used when we want to intercept HTTP POST request. this is actually used to postprocess the submitted HTML form and displaying/getting the result.
Moreover HTTP GET method sends the parameter/value with URL whereas POST method sends the parameter with headers.