> From: Elliot Huntington [mailto:[EMAIL PROTECTED] > 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 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 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: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]