Some personal understanding of Servlet

1. What is Servlet 1. Servlet

  is a dynamic web page technology based on Java technology. It runs on the server side and is managed by the Servlet container to generate dynamic content. It is jsp (servlet is very cumbersome for web page development, so it is generally used for The predecessor of flow control).

  Supplement: jsp: The framework of jsp is HTML. It is very simple and convenient to develop web pages. Java is embedded in it. The essence of jsp is servlet. The execution process of jsp: jsp----translation---->.java(servlet)----compile---->.class-----> execution.

  2. Servlet is essentially a java class that implements a specific interface. Writing a servlet is actually writing a java class according to the Servlet specification.

  3. Servlet is not directly called by users or programmers, it is managed by the container and has no main method.
Second, the life cycle of Servlet

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326603930&siteId=291194637