Hi, Do you have both a .war file or your webapp and an exploded directory structure for it? Do you have a <Context> element for your context in the server.xml file? Either of those can cause double initialization under some circumstances, and then you'd see listeners instantiated twice, load-on-startup servlet's init() methods being called twice, filters initialized twice, etc.
If so, try commenting out the <context> element for your context in server.xml, and ensuring you have either a .war file or an exploded directory structure for your webapp, but not both. There have been issues with this in the past: searching the list archives may yield more information. Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Tobias Dittrich [mailto:[EMAIL PROTECTED]] >Sent: Friday, January 10, 2003 2:35 AM >To: Tomcat Users List >Subject: ServletContextListener started 2 times > >Hi, > >I have the following problem on tomcat 4.1.18: I defined a >ServletContextListener in the web.xml for my webapp so I can do some >initializing stuff when my webapp is startet. Now when I start tomcat >everything is just fine, the Listener gets notified and starts my config. >But after a few moments the webapp seems to be loaded again. A complete new >instance of my Listener class is created and notified again (I am setting >flags if config is loaded etc but these are unset).. >I have set the Context to not reload in the server xml and the Host has >autoDeply false. > >As this would not be such a big flaw alone, there is something that makes >it >very bad: if I do not use unzipped classes for my application but put the >contents in a jar file under WEB-INF/lib, tomcat always runs into a >segmentation fault on second startup of my Listener class. > >Any suggestions why tomcat is loading my Listener class twice on startup >and >if this is a feature or a bug? Any help would be appreciated. > >Thanks >Tobi > > >-- >To unsubscribe, e-mail: <mailto:tomcat-user- >[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:tomcat-user- >[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
