-
What is Servet
-
Java is a small program that runs on a web server, and in response to receiving a request from a client over, typically using the HTTP protocol
-
-
The role of the Servlet
-
It used to process request from a client over, and responds
-
-
to sum up:
-
We send a request from the browser client to the server, submit the data. Where to submit Servlet, Servlet can receive parameters submitted over, and then make some background for logical processing parameters, the final result of the process of sending a response to the browser client.
-
Two, Servlet life cycle
-
The life cycle of an object is the process from creation to destruction
-
Servlet life cycle: Servlet process from creation to destruction
-
When to Create: Create Servlet instance when the user first accesses Servlet
-
When destruction: When an item is removed from the server, or shut down the server when the destruction of Servlet
-
-
Please indicate the source: https://www.cnblogs.com/Infancy/p/12503409.html