Obviously, load_on_startup
value of 0 means don't, and 1 means do. But what does a value of 2 mean?
EDIT: Obviously, I shouldn't assume things before I check them. A value of 0 still means load on startup. Thanks stacker.
The servlet sp开发者_开发知识库ecification is surprisingly hard to reach.
(Here's where I saw 2 as a possible value).
load-on-startup
can specify an (optional) integer value. If the value is 0 or greater, it indicates an order for servlets to be loaded, servlets with higher numbers get loaded after servlets with lower numbers.
It defines the order in which the container loads the servlet. The servlet is not loaded until a request tries to access it.
The container starts the servlet in ascending order of the load on defined startup value (1 before 2, 2 before 5 and so on.)
精彩评论