Servlets can be used for handling both the GET Requests and the POST Requests. An individual developing servlets for handling HTTP Requests needs to override one of these methods in order to process the request and generate a response.
Servlets are the small programs that are run on the server side of the connection and they're used to dynamically extend the functionality of a web server. They follow the standard framework, use portable Java language.