Servlet is an interface that defines the servlet that must be implemented, and HttpServlet is a servlet specifically bound to the HTTP protocol.
httpservlet forced to transfer parameters in the service function:
ServletRequest—>HttpServletRequest;
ServletResponse—>HttpServletResponse
Different methods (doGet, doPost) are called according to different request methods (get, post), so if we write http services, we can directly inherit HTTPServlet, and then process them in methods such as doGet.