Ivan, I had this problem. I found it was caused when you use Tomcat Standalone and Tomcat Apache (at least when using mod_webapp / warp). I don't need Tomcat Standalone, so I removed it from server.xml. It seemed that a separate class instance was being loaded for each (I tested 4.0.1 and 4.0.4b1). If you need both access methods, you can at least share the same instance by putting your classes in Tomcat/common/lib in a jar, rather than webapps/appname/classes, although the init() method will still get called twice. You just have to write the init method so that it already knows it's been called.
By the way, if you remove Tomcat standalone, to get Tomcat to call the init method, you have to start Tomcat then restart Apache. Personally, I'm not sure this behaviour is "As Designed", but this fixed it for me. I, like most others it seems, find the whole area involving connectors somewhat difficult to understand. I don't see why different connectors should involve different sets of class instances. Hope this helps, Andy > -----Original Message----- > From: Donie Kelly [mailto:[EMAIL PROTECTED]] > Sent: 29 April 2002 19:15 > To: 'Tomcat Users List' > Subject: RE: Servlet init() callin twice on startup. PLease help. > > > Do you have the servlet mapped twice in web.xml? > > -----Original Message----- > From: IvanLatysh [mailto:[EMAIL PROTECTED]] > Sent: 29 April 2002 19:17 > To: Tomcat Apache > Subject: Servlet init() callin twice on startup. PLease help. > > I have servlet that executing on start up. > And when I see log - i can see that servlet was started twice. > I need to start it one. > Where I am wrong ? > > Sincerely yours, Ivan Latysh. > [EMAIL PROTECTED] > http://ivan.yourmail.com > > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>