servlet load-on-startup

servlet load-on-startup 真实含义
2010-03-24 09:39
这个标签的含义是指,容器启动时加载这个servlet的顺序,正常的取值范围是:负数,0-5,如果是负数或者没有这个标签,则容器在启动时不自动加载 这个servlet,如果是0-5,则按照顺序加载这个servlet,执行初始化方法init()。数字是0-5,加载顺序也是0-5。下面是文档说 明: 
The  load-on-startup element indicates that this servlet should be loaded (instantiated and have its init() called) on the startup of the web application. The optional contents of these element must be an integer indicating the order in which the servlet should be loaded. If the value is a negative integer, or the element is not present, the container is free to load the servlet whenever it chooses.  If the value is a positive integer or 0, the container must load and initialize the servlet as the application is deployed. The container must guarantee that servlets marked with lower integers are loaded before servlets marked with higher integers. The container may choose the order of loading of servlets with the same load-on-start-up value.

你可能感兴趣的:(Web,servlet,UP)