<! DOCTYPE Web-app Public
"-//sun Microsystems, INC.//DTD Web application 2.3//en"
"Http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>archetype Created Web application</display-name>
<!--SPRINGMVC Configuration--
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<!--SPRINGMVC configuration file--
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:springmvc-servlet.xml</param-value>
</init-param>
<!--
1) The Load-on-startup element flags whether the container loads the servlet at startup (instantiating and invoking its init () method).
2) Its value must be an integer indicating the order in which the servlet should be loaded
3) A value of 0 or greater than 0 o'clock indicates that the container loads and initializes the servlet when the application is started;
4) When the value is less than 0 or unspecified, the container will not load until the servlet is selected.
5) The lower the value of a positive number, the higher the precedence of the servlet, and the more loaded it will be when the app starts.
6) At the same time, the container will be loaded in its own order of choice.
-
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Load-on-startup explanation