In the web application descriptor, the servlet tag looks like this:

  <servlet>
    <servlet-name>MyServlet</servlet-name>
    <display-name>My Servlet</display-name>
    <description>This is my own servlet</description>
    <servlet-class>org.foo.MyOwnServlet</servlet-class>
    <load-on-startup>27</load-on-startup>
  </servlet>

The number in the "load-on-startup" tag indicates the order in which the servlets will 
be initialized when Tomcat starts.

Paul

11.03.2002 18:14:42, Frank Diakovasilis <[EMAIL PROTECTED]> wrote:

>
>
>  Date:   Mon, 11 Mar 2002 11:14:42 -0500
>
>  From:   Frank Diakovasilis <[EMAIL PROTECTED]>
>  Subject:Initializing servlet on service startup
>  To:     [EMAIL PROTECTED]
>
>
>
>  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.

----------------------------------------
Paul Balanoiu
Bucharest, Romania

___________________________________________________________________________
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