The service() method is defined in GenericServlet, which was intended to be able to support different protocols. In practice you're always going to be using HTTP. The service() method is implemented in HttpServlet in a way that makes life simpler - it does all the mapping of HTTP requests for you, so all you need to do is implement the ones you want to use.