1. What is Servlet?
Servlets are small programs that run on a server. A servlet is a Java class and a servlet program that resides in server memory that can be accessed through the "request-response" programming model.
2. Tomcat container level:
The container of Tomcat is divided into four levels, the container of Servlet manages the Context container, and a Context corresponds to a Web project.
3. Steps to write a servlet class:
①Inherit HttpServlet
②Rewrite the doGet() or doPost() method
③Register Servlet in web.xml