tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elliot Huntington" <>
Subject Re: How to configure multiple web applications in a single host
Date Fri, 11 Jul 2008 01:21:37 GMT

Thanks so much for your help with this. Unfortunately it still isn't working

I decided to try and start over. So I did "rm -rf $CATALINA_HOME" and then
re-created $CATALINA_HOME.
So I have a clean install of apache-tomcat-5.5.26. I did not modify anything
I did do:
$ rm -rf $CATALINA_HOME/webapps/*
to start out with a clean webapps directory.

Then, I extracted A.war in $CATALINA_HOME/webapps/A and B.war in
I did as you said and added A/META-INF/context.xml and
B/META-INF/context.xml. Both of them have this content:

<?xml version="1.0" encoding="UTF-8"?>
 <ResourceLink name="users" global="UserDatabase"

Once again, only one of the applications will work and the other one gives a
404 error.
I've unsuccessfully tried every possible configuration that I can think of
to get both applications to be served simultaneously.

Do you have any other suggestions or could you post a working example of the
configuration files that I would need to get both A and B to be served at
the same time?

Thanks so much for your help.

On Wed, Jul 9, 2008 at 9:14 PM, Caldarale, Charles R <> wrote:

> > From: Elliot Huntington []
> > Subject: Re: How to configure multiple web applications in a
> > single host
> >
> > >$CATALINA_HOME/conf/Catalina/localhost/A.xml
> > <?xml version="1.0" encoding="UTF-8"?>
> > <Context path="" docBase="${catalina.home}/webapps/A">
> >    <ResourceLink name="users" global="UserDatabase"
> > type="org.apache.catalina.UserDatabase"/>
> > </Context>
> > >$CATALINA_HOME/conf/Catalina/localhost/B.xml
> > <?xml version="1.0" encoding="UTF-8"?>
> > <Context path="/B" docBase="${catalina.home}/webapps/B">
> >    <ResourceLink name="users" global="UserDatabase"
> > type="org.apache.catalina.UserDatabase"/>
> > </Context>
> Bingo - both of the above are causing you problems.
> If you want one of the webapps to be the default webapp for the <Host>, it
> must be named ROOT (case-sensitive).  Do not attempt to force it to happen
> with the path attribute, that will simply confuse things (as you've
> noticed).  Also, supplying a docBase attribute that points into the <Host>
> appBase directory will result in multiple deployments of your webapps, which
> is usually quite undesirable.
> To fix this, remove both the A.xml and B.xml files from
> conf/Catalina/localhost.  Remove any existing ROOT directory or .war file
> from the webapps directory.  Change the directory name of A to ROOT.  Create
> these two files:
>  $CATALINA_HOME/webapps/ROOT/META-INF/context.xml
>  $CATALINA_HOME/webapps/B/META-INF/context.xml
> Both will contain the following (and just the following):
> <?xml version="1.0" encoding="UTF-8"?>
> <Context>
>   <ResourceLink name="users" global="UserDatabase"
>   type="org.apache.catalina.UserDatabase"/>
> </Context>
> Note that the path and docBase attributes must not be used here.
>  - Chuck
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message