Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 32946 invoked from network); 11 Jul 2000 16:29:16 -0000 Received: from pixel.elseweb.com (HELO webcollage.com) (199.203.179.226) by locus.apache.org with SMTP; 11 Jul 2000 16:29:16 -0000 Received: from athena.elseweb.com (athena [192.168.1.30]) by webcollage.com (8.9.3+Sun/6.2.1) with ESMTP id SAA11309 for ; Tue, 11 Jul 2000 18:32:35 +0200 (IST) Received: by mail.israel.elseweb.com with Internet Mail Service (5.5.2650.21) id <3NNHZZT6>; Tue, 11 Jul 2000 19:28:44 +0300 Message-ID: From: Amos Shapira To: "'tomcat-user@jakarta.apache.org'" Subject: RE: Running a servlet on startup Date: Tue, 11 Jul 2000 19:28:44 +0300 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Hi, I think what you have to do is to define a web application which includes this servlet and assign a tag for that servlet in the context of the web application. Be aware that this way (which is supported by the standard of Java Servlets 2.2) may cause your servlet's init() method to be invoked every time the servlet is loaded (i.e. if the engine removed the servlet earlier for some reason or if the servlet is configured under more than one name, or declared as "single thread model" which will cause multiple instances of it to be created). As for the class name question, I think you should give the plain "full" class name, in your case it would be "myservlet" since it looks it is in the default Java package (no "package" clause in its .java file, right?) Hope this helps, --Amos Shapira WebCollage > -----Original Message----- > From: ymorahg@gist.com [mailto:ymorahg@gist.com] > Sent: Tuesday, July 11, 2000 7:26 PM > To: tomcat-user@jakarta.apache.org > Subject: Running a servlet on startup > > > Hi. > > I want to run a startup servlet to set some global system > properties when > Tomcat starts up. I think I need to add a class-"myservlet" /> to my server.xml file. Is this correct? > > Also, if this is correct, if my servlet resides in > webapps/myservlets/WEB-INF/classes/myservlet.class what do I > put for the > value inside the class="????" I see the example is > org.apache.tomcat.context.servletname, so what does mine map to? > > Thanks a lot for your help! > > -Yoav > > --------------------------- > Yoav Morahg > Software Engineer > Gist Communications > (212) 965-1999 xt 122 > ymorahg@gist.com > >