tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Paul Le Fèvre" <lefe...@hep.saclay.cea.fr>
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="l3sdb.saclay.cea.fr" appBase="xmm" >
     <Context path = "" docBase = "l3sdb" />
</Host>

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 : J-P.LeFevre@cea.fr



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message