Hi all:

This is third time I am posting the same question. I tried everything I
could, including re-installing Tomcat from scratch. But, the problem still
remains. Please help !!

I am using Tomcat 5.5.16 (stand-alone) with JDK 5.0 on Windows XP and trying
to setup virtual hosting (to start with two test hosts + localhost). There
is a single ROOT context for each of my test hosts test1.mymachine.com and
test2.mymachine.com as shown below. The root context is defined in a file
named ROOT.xml which is present in

$CATALINA_HOME/conf/[engine_name]/test1.mymachine.com/ROOT.xml
$CATALINA_HOME/conf/[engine_name]/test2.mymachine.com/ROOT.xml

Once I start the tomcat server, three host folders are being created inside
the work directory. As expected the localhost host has all the webapps that
come with tomcat 5.5.16 installation like examples, etc. The work directory
also has two other host folders test1.mymachine.com and test2.mymachine.com.


PROBLEM:

In test1.mymachine.com and test2.mymachine.com along with the root context
all folders present in $CATALINA_HOME are being deployed as contexts. I can
see folders being created in work directory of test1 and test2 which are
exaclty the foldes present in $CATALINA_HOME

Is this is BUG in tomcat 5.5.16 or is there something wrong with my setup.

Any help is appreciated.

Thanks in advance.

ROOT.xml file for test1.mymachine.com

<Context path="" docBase="c:\websites\test1\webapps\test1"
        debug="5" reloadable="true" crossContext="true">

....DB resources

</Context>

ROOT.xml file test2.mymachine.com

<Context path="" docBase="c:\websites\test2\webapps\test2"
        debug="5" reloadable="true" crossContext="true">

....DB resources

</Context>

Following is the engine tag of my server.xml file

<Engine name="Catalina" defaultHost="localhost">

      <Realm className="org.apache.catalina.realm.UserDatabaseRealm "
             resourceName="UserDatabase"/>

      <Host name="localhost" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">

      </Host>

      <Host name="test1.mymachine.com" debug="0"
appbase="c:\websites\test1\webapps"
    unpackWARs="true">
    <Alias>"test1.mymachine.com"</Alias>

            <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="c:\websites\test1\webapps\logs"
prefix="test1_access_log." suffix=".txt"
                 pattern="common" resolveHosts="false"/>

    <Logger className="org.apache.catalina.logger.FileLogger"
        directory="c:\websites\test1\webapps\logs"
prefix="test1_catalina_log." suffix=".txt"
    timestamp="true"/>

      </Host>

      <Host name="test2.mymachine.com" debug="0"
appbase="c:\websites\test2\webapps"
    unpackWARs="true">
    <Alias>"test2.mymachine.com"</Alias>

            <Valve className=" org.apache.catalina.valves.AccessLogValve"
                 directory="c:\websites\test2\webapps\logs"
prefix="test2_access_log." suffix=".txt"
                 pattern="common" resolveHosts="false"/>

    <Logger className="org.apache.catalina.logger.FileLogger"
        directory="c:\websites\test2\webapps\logs"
prefix="test2_catalina_log." suffix=".txt"
    timestamp="true"/>

      </Host>

    </Engine>

Vamsi.

Reply via email to