I've posted this question last week and talked to Remmy, but Remmy is busy with moving. I spent some time this weekend trying to track down the bug, but couldn't figure it out. I'm hoping if I describe the bug more clearly, someone can point me in the right direction.
The bug is the following: If I have server.xml set with all the defaults and I have a ServletContextListener defined in web.xml, Tomcat correctly creates an instance of my listener and starts my test application. If I add a webapp, it also correctly creates an instance of my listener and starts the test application. If on the otherhand I change server.xml to point to a different directory for the default root path from "ROOT" to say "myapp", Tomcat ends up creating two separate instances of the listener. Both listeners get contextInitialized() event and create one instance of my test application per listener. The correct behavior should be the same as leaving the root directory to the default "ROOT". If I use 4.1.8 and load up the manager, I see webapp "/" and "/myapp". This explains why two separate instances of my listener are created. I only want 1 instance of my test application to startup with tomcat, since it loads global configuration values into memory. I looked in catalina.core.StandardContext, but I don't see which class is responsible for creating the listener listed in web.xml. Is the behavior of creating two instances of my listener according to specification? Is there something special about changing the default root path from "ROOT" to some other "myapp" path? peter lin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>