You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by st...@cristal-union.fr on 2002/07/17 09:15:59 UTC
in web.xml
Hi,
What's the use of the "load-on-startup" element in web.xml?
Thanks.
Jc
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: in web.xml
Posted by Jacob Hookom <ho...@uwec.edu>.
Usually servlets are lazy-loaded, meaning, the init() method of the
servlet is not called until a user makes a request to it for the first
time. By putting the load-on-startup with an integer as a value, then
you force the servlet to call init() on startup. This may be
advantageous as you may want to read in configuration files or set
application properties with your servlet.
<!-- [Example] -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>0</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
Jacob Hookom
CS Student
University of Wisconsin, Eau Claire
===================================
http://www.swanked.net
you're not hip enough yet
-----Original Message-----
From: staginfo-ar@cristal-union.fr [mailto:staginfo-ar@cristal-union.fr]
Sent: Wednesday, July 17, 2002 2:16 AM
To: Tomcat Users List
Subject: <load-on-startup> in web.xml
Hi,
What's the use of the "load-on-startup" element in web.xml?
Thanks.
Jc
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.375 / Virus Database: 210 - Release Date: 7/10/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.375 / Virus Database: 210 - Release Date: 7/10/2002
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>