Thank you.

-----Original Message-----
From: Attila Szegedi [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 11:08 AM
To: [EMAIL PROTECTED]
Subject: Re: Initializing servlet on service startup


Use <load-on-startup> element inside the <servlet> element in your web.xml.

You'll find precisely how to use it in in the servlet spec :-)
Basically something like:

<servlet>
  <servlet-name>myServlet</servlet-name>
  <servlet-class>com.foo.MyServlet</servlet-class>
  <load-on-startup>1</load-on-startup>
</servlet>

If you have multiple servlets that have to be loaded on startup, you can set
their startup order using increasing numbers as the load-on-startup element
content.
--
Attila Szegedi
home: http://www.szegedi.org

----- Original Message -----
From: Frank Diakovasilis
To: [EMAIL PROTECTED]
Sent: 2002. m�rcius 11. 17:14
Subject: Initializing servlet on service startup


Hi,
Anybody know how you would have tomcat initialize a servlet (call it's
init() method) at startup.  I have it as an nt service and would like the
servlet to be initialized at service start and not when the first request
comes in.  Any help would be appreciated. Thank you.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to