One
1. Start the Tomcat startup Web project, first read the XML file in the <context-param> and <listener>
2. The container creates a ServletContext (servlet context), and all parts of the Web project will share this context.
3. The container converts <context-param> into a key-value pair and gives it to ServletContext.
4. The container creates a class instance in <listener>, creating the listener.
Two
The Load-on-startup element specifies the order in which the servlet is loaded when the Web application is launched, and its value must be an integer. If its value is a negative integer or the element does not exist, the container will load the servlet when the servlet is called. If the value is a positive integer or 0, the container loads and initializes the servlet when configured, and the container must ensure that the value is loaded first. If the values are equal, the container can automatically select who to load first.
Three
context-param–> listener–> filter–> servlet
Details: http://www.educity.cn/java/689206.html
Web. XML Loading sequence