tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <>
Subject RE: Multiple Domains on one Tomcat Server now MySQL not working
Date Tue, 13 Oct 2009 00:47:49 GMT
> From: Paul van Hoven []
> Subject: Multiple Domains on one Tomcat Server now MySQL not working
> I'm not shure if this problem really relates to Tomcat but it happened
> after altering the tomcat configuration.

Care to give us a hint about version of Tomcat you're using?  Configuration is different from
level to level.

> Therefore i search on the internet how to manage
> multiple domains on Tomcat.

Might be better to read the real documentation first:

> I found this resource:

It's unfortunate you found that, since it's chock full of errors.

>      <Host name="localhost"  appBase="webapps"
>             unpackWARs="true" autoDeploy="true"
>             xmlValidation="false" xmlNamespaceAware="false">
>         </Host>
>       <Host name=""
>            debug="0"
>            appBase="webapps/myapp2"

The above is not good; the different appBase directories must be distinct, not one under another.

>            unpackWARs="true"
>            autoDeploy="true"
>            xmlValidation="false"
>            xmlNamespaceAware="false">
>     <Logger className="org.apache.catalina.logger.FileLogger"
>            directory="logs"
>            prefix=""
>            suffix=".txt" timestamp="true"/>

<Logger> elements have not been used in Tomcat for some years.

>     <Alias></Alias>
>       </Host>
>     </Engine>
>   </Service>
> </Server>
> and i added the follwing ROOT.xml file in the folder
> $CATALINA_HOME/conf/Catalina/

> ROOT.xml:
> <?xml version='1.0' encoding='utf-8'?>
>     <Context displayName=""
>                   docBase=""
>                   path=""
>                   workDir="work/Catalina/">
> </Context>

Both the docBase and path attributes have invalid values; luckily, neither one is allowed
here, and they are hopefully being ignored.

> Actually it works fine, i can now differentiate between the two webapps
> by the domain.

What two webapps?  You have only shown us one <Context> element.

> But while the first webapp has no problems accessing the
> mysql database i do have problems with the second webapp for which i
> added the new configuration.

What's the first webapp?  What <Resource> elements have you defined, and where are they?
 You might want to post your complete server.xml and all <Context> elements.

 - Chuck

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 unsubscribe, e-mail:
For additional commands, e-mail:

View raw message