开发者

What are the possible values of load_on_startup in a servlet entry on web.xml?

开发者 https://www.devze.com 2022-12-29 13:49 出处:网络
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

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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号