Servlet technology and structure system

  1. Servlet is essentially a java class written according to the Servlet specification, but it can handle related requests in Web applications.
  2. Servlet is a standard, which is defined by Sun, and its specific details are implemented by Servlet containers, such as Tomcat, JBoss, etc.
  3. Serializable is the serialization interface in the java.io package. Servlet and ServletConfig are objects defined in the javax.servlet package. These two objects define the basic methods of the Servlet and encapsulate the relevant configuration information of the Servlet.
  4. GenericServlet is an abstract class. It implements the above three interfaces. This object provides partial implementation for Servlet interface and ServletConfig interface, but it does not implement HTTP request processing. This operation is implemented by its subclass HttpServlet .
  5. HttpServlet provides specific operation methods for POST, GET and other types in HTTP requests, so under normal circumstances, the Servlet objects we write are inherited from HttpServlet. In development, the specific Servlet object used is the HttpServlet object, the reason is HttpServlet It is the implementation class of Servlet, and provides the processing method of HTTP request.
Servlet structure system diagram

 

Guess you like

Origin blog.csdn.net/weixin_44182586/article/details/100889079