Hello
I have set up tomcat 6.0.13 with several virtual hosts, and uses mainly the
root-context on each.
for some of the hosts, I have created context-files in the corresponding
directory.
hosts-part of server.xml :
<Host name="jira" appBase="/local/www/dummy"
unpackWARs="true" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
<Alias>jira.fritid.as</Alias>
<Context path="/manager" debug="0" privileged="true"
docBase="/local/tomcat/webapps/manager" />
</Host>
<Host name="asak" appBase="/local/www/dummy"
unpackWARs="false" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>ks.asak.no</Alias>
<Alias>www.xn--asakmiljstein-inb.no</Alias>
<Context path="/manager" debug="0" privileged="true"
docBase="/local/tomcat/webapps/manager" />
</Host>
<Host name="lif" appBase="/local/www/dummy"
unpackWARs="false" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
<Alias>www.lorenskogif.no</Alias>
<Context path="/manager" debug="0" privileged="true"
docBase="/local/tomcat/webapps/manager" />
</Host>
<Host name="fau" appBase="/local/www/dummy"
unpackWARs="false" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
<Alias>www.solheim.fau.no</Alias>
<Context path="" docBase="/local/www/fau" debug="0">
<Manager
className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"
/>
</Context>
<Context path="/manager" debug="0" privileged="true"
docBase="/local/tomcat/webapps/manager" />
</Host>
<Host name="lux1" appBase="/local/www/dummy"
unpackWARs="false" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>lux.fritid.as</Alias>
<Context path="/manager" debug="0" privileged="true"
docBase="/local/tomcat/webapps/manager" />
</Host>
<Host name="jung" appBase="/local/www/dummy"
unpackWARs="false" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>kurs.jungheinrich.fritid.as</Alias>
<Context path="" docBase="/local/www/jung" debug="0">
<Manager
className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"
/>
</Context>
<Context path="/manager" debug="0" privileged="true"
docBase="/local/tomcat/webapps/manager" />
</Host>
<Host name="localhost" appBase="/local/www/default"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>wh2.fritid.as</Alias>
</Host>
for the hosts jira, asak, lux1 and lif I have created subfolders
conf/Catalina/jira, conf/Catalina/asak etc. and into
those direcories I have put a single file ROOT.xml
like those :
(asak):
<Context docBase="/local/www/asak" debug="0">
<Manager
className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"
/>
</Context>
(lif):
<Context docBase="/local/www/lif" debug="0" reloadable="true">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource name="jdbc/lif" auth="Container" initialSize="3"
type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://10.1.3.1:3306/lif"
username="****" password="****" maxActive="25" maxIdle="2"
minIdle="0" maxWait="1000"
removeAbandonedTimeout="10"
logAbandoned="true" removeAbandoned="true"
/>
</Context>
(lux) :
<Context path="" docBase="/local/www/luxApp-1.0-SNAPSHOT.war" debug="0"
reloadable="true">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
As you can see, the LUX-context points to a packed WAR-file, and this is the
one I have trouble with.
When I redploy this WAR-file (replaces it with a new one) Tomcat detects this,
and redeploys this application. The
problem is that it also deletes the ROOT.xml for the three hosts (jira, lif and
asak) the hosts with all
context-information inside server.xml is left untouched...
All three doc-bases are valid.
Why does Tomcat do this, and how can I stop it ?
Regards
Frode Halvorsen
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]