The service() method of GenericServlet doesn't get called. But that's the nice thing about polymorphism. The Container calls service() on an object that implements the Servlet interface without knowing its specific class. In most cases this class will be your own Servlet, which extends HttpServlet. So through polymorphism the Container will call the most specific version of service(). However, because you never override service() yourself, the service() method of the superclass HttpServlet gets invoked.
By the way, the doXXX() methods are not called directly by the Container. The container only invokes the service() method. And in HttpServlet it is the service() method which redirects the request to the correct doXXX() method.
There exist two service methods in the HttpServlet: * protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException Defined to be http dependent,
and the one declared in the Servlet interface (which is protocol independent): * public void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res) throws ServletException, IOException
To process a client request, the web container calls the public service method, it calls in turn the protected service method which calls the appropriate doXXX(...) method.