在servlet的配置当中,<load-on-startup>5</load-on-startup>的含义是:
标记容器是否在启动的时候就加载这个servlet。
当值为0或者大于0时,表示容器在应用启动时就加载这个servlet;
当是一个负数时或者没有指定时,则指示容器在该servlet被选择时才加载。
正数的值越小,启动该servlet的优先级越高。
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.
example:
<servlet>
<servlet-name>initservlet</servlet-name>
<servlet-class>com.bb.eoa.util.initServlet</servlet-class>
<init-param>
<param-name>log4j-init-file</param-name>
<param-value>config/log.properties</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
分享到:
相关推荐
<description>ZK loader for ZUML pages <servlet-name>zkLoader</servlet-name> ... <!-- 必须指定更新引擎(DHtmlUpdateServlet)的URI,并且... <load-on-startup>1</load-on-startup><!-- Must --> </servlet>
4.将以下代码添加到web.xml配置文件中: <servlet-name>Connector</servlet-name> <servlet-class> com.FCKeditor.connector.ConnectorServlet </servlet-class> <init-param> <param-name>baseDir</param-...
<load-on-startup>1</load-on-startup> <!-- 配置所有以.do结尾的请求交给DispatcherServlet进行处理,也可以设置其他值,如.action等 --> <servlet-mapping> <servlet-name>Dispatcher</servlet-name> ...
<load-on-startup>1</load-on-startup> </servlet> 加载 DispatcherServlet 时 Spring 会尝试读取配置文件 默认的配置文件位于 web.xml 相同的路径下 文件名与注册的 Servlet 名有关 Servlet注册名跟上 -...
<load-on-startup>1</load-on-startup> <servlet-mapping> <servlet-name>account</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> 要与web-inf里面account-servlet.xml名字对应、要...
* * * * Spring MVC的核心类和...<param-name>contextConfigLocation</param-name> <param-value>classpath:springmvc-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <se
1.FCKeditor2.4集成在SSH框架中,在web.xml中要加入以下配置 <servlet-name>Connector</servlet-name> <servlet-class> /*根据自己的项目路径导入ConnectorServlet.class*/ ... </servlet-class> ...
8)....Fixed: Removed some unnecessary file system access on startup 9)....Fixed: Possible wrong font size in EurekaLog tools 10)..Fixed: Ignore timeouts from Shell_NotifyIcon 11)..Fixed: Possible ...
<load-on-startup>1</load-on-startup> <servlet-mapping> <servlet-name>ideawu</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp...
一、 1、启动一个WEB项目的时候,WEB容器会去读取它的配置...load-on-startup 元素在web应用启动的时候指定了servlet被加载的顺序,它的值必须是一个整数。如果它的值是一个负整数或是这个元素不存在,那么容器会在该s
<load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>annomvc</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> </web-app> 清单 3. annomvc-servlet....
【版本更新说明】 ... <load-on-startup>3</load-on-startup> <servlet-mapping> <servlet-name>debugjsp</servlet-name> <url-pattern>*.jsp</url-pattern> </servlet-mapping> 6、重新启动服务器即可。
<load-on-startup >1 </load-on-startup > </servlet > 第三步:新建一个Proxool.xml放在hibernate.cfg.xml同一目录,内容如下:[/b] <?xml version="1.0" encoding="utf-8"?> <!-- the proxool configuration...
5、非常容易的可以和Web应用服务器结合,Tomcat, Resin, Jetty and Jboss这些服务器已经通过测试和应用,这一切只需要在web.xml中添加load-on-startup直接指定Jcrontab下的 loadCrontabServlet,就可以了。...
5、非常容易的可以和Web应用服务器结合,Tomcat, Resin, Jetty and Jboss这些服务器已经通过测试和应用,这一切只需要在web.xml中添加load-on-startup直接指定Jcrontab下的 loadCrontabServlet,就可以了。...
2. 在web.xml中加入如下: <!-- ****************** axis ws start ****************** --> <listener-class> org.apache.axis.transport.http.AxisHTTPSessionListener </listener-class> <servlet...
web.xml 中配置 完善了对上传图片的验证 <context-param> <param-name>FCKAllowedExtensionsImage</param-name> <param-value>jpg|gif|jpeg|png|bmp </param-value> </context-param> ...
将FileActionForm直接作为业务层的接口入参,相当于将Web层传播到业务层中去,即将业务层绑定在特定的Web层实现技术中,按照分层模型学院派的观点,这是一种反模块化的设计,但在"一般"的业务系统并无需提供多种UI...
37 <load-on-startup>1</load-on-startup> 38 39 40 <servlet-mapping> 41 <servlet-name>ideawu</servlet-name> 42 <url-pattern>*.do</url-pattern> 43 </servlet-mapping> 44 45 <welcome-file-list> 46 ...