Tomcat execution process!

write picture description here
Servlet execution process
Tomcat structure
Description : After a user initiates a request, the server receives and processes it and receives the web. The configuration information of the Xml file, if the corresponding resource cannot be found, a 404 error will appear!
If the class class in the servlet is written wrong, there will be a 500 error!

Servlet life cycle
0. The container creates objects for us, but the container does not know our construction method, it does not know how many parameters you pass, and what type of parameters you pass. The no-argument constructor is the process of instantiation.
1. Can the container create objects according to the parameterized construction method?
Technically yes, but the servlet doesn't provide that and we have to stick to it.
**

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325985842&siteId=291194637