tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Paul Le Fèvre" <>
Subject Re: contextInitialized() called twice
Date Mon, 06 Oct 2003 14:46:07 GMT

Hello Anton,

I finally succeeded (I hope !) in finding the cause of my
initialization problem. However it is not clear to me whether
it is a bug or a feature :)

The problem occurs only for a virtual host, the default host behaves
as expected.

Here is the simplified configuration virtual host paragraph :

 <Host name="" appBase="xmm" >
     <Context path = "" docBase = "l3sdb" />

I define l3sdb as the default (and the only one) web app for this host.
In this case the ServletContextListener is initialized twice
(a static variable shows that the listener is *created* twice).

If I change the context configuration to :

     <Context path = "/l3sdb"  docBase = "l3sdb" />

the listener is correctly created and initialized only once, but,
as a consequence, my application is not anymore the default one.
A reasonable workaround would be to add a statement like this :

     <Context path = "" docBase = "" />

Moreover I've concluded that the appBase should be different for
each virtual host even if autoDeploy is false.


Jean-Paul Le Fèvre  * Mail :

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message