W
Will
Hi,
I'm battling with a problem where my web app is being deployed twice
by tomcat. I've been through the documentation a number of times and
understand that if tomcat is set to use autodeployment, and if an
explicit context has been defined for the app (which it has)
deployment may very well happen twice if the WAR is placed inside the
appBase.
I have defined an explicit context for my app and placed it in:
$CATALINA_HOME/conf/[engine_name]/[host_name]
It looks like this:
<Context path="/sps" docBase="sps" unpackWAR="true"/>
But, I have turned off auto deployment for the localhost in the
server.xml:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="false" deployOnStartup="false"
xmlValidation="false" xmlNamespaceAware="false">
I have placed my WAR file inside the webapps directory.
However, I have a servlet context listener registered for my context
'sps' which is firing twice when tomcat starts up. Both times, the
ServletContextEvent that it receives in contextInitilized() is for the
'sps' context.
I've tried moving the WAR file outside of the webapps directory and
explicitly defining it's path in the context's docBase attribute, but
this makes no difference - I still see the context initialised twice.
This behaviour is the same on Tomcat 5.5.7 and 5.0.28.
Can anybody help me out here? I'm struggling to come up with an
answer.
Many thanks in advance,
Will
I'm battling with a problem where my web app is being deployed twice
by tomcat. I've been through the documentation a number of times and
understand that if tomcat is set to use autodeployment, and if an
explicit context has been defined for the app (which it has)
deployment may very well happen twice if the WAR is placed inside the
appBase.
I have defined an explicit context for my app and placed it in:
$CATALINA_HOME/conf/[engine_name]/[host_name]
It looks like this:
<Context path="/sps" docBase="sps" unpackWAR="true"/>
But, I have turned off auto deployment for the localhost in the
server.xml:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="false" deployOnStartup="false"
xmlValidation="false" xmlNamespaceAware="false">
I have placed my WAR file inside the webapps directory.
However, I have a servlet context listener registered for my context
'sps' which is firing twice when tomcat starts up. Both times, the
ServletContextEvent that it receives in contextInitilized() is for the
'sps' context.
I've tried moving the WAR file outside of the webapps directory and
explicitly defining it's path in the context's docBase attribute, but
this makes no difference - I still see the context initialised twice.
This behaviour is the same on Tomcat 5.5.7 and 5.0.28.
Can anybody help me out here? I'm struggling to come up with an
answer.
Many thanks in advance,
Will