浏览 4328 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2010-12-17
最后修改:2010-12-17
load-on-startup定义了servlet启动的顺序。如果是负数或未出现。如 <load-on-startup>-3</load-on-startup>则容器自由决定什么时加载,通常是请求servlet 到达时加载。 如果是正数或0,则部署的项目启动时就加载,加载顺序为数小的先加载。 加载的含义(实例化servlet并执行该servlet的init()方法。) 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2010-12-17
Servlet specification:
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. |
|
返回顶楼 | |
发表时间:2010-12-17
规范里面的约定!
|
|
返回顶楼 | |
发表时间:2010-12-20
这个我们关心的好像不是太多,只是在有的项目当中,还是需要注意这个的 |
|
返回顶楼 | |