That seems to have been the solution! Thanks very much. 

Is this documented anywhere in the official Tomcat documentation?  

-----Original Message-----
From: charly [mailto:[EMAIL PROTECTED] 
Sent: 11 June 2005 10:08
To: Tomcat Users List
Subject: Re: Managing automatic deployment with multiple virtual hosts

Hello,

have you tried naming the war files
"ROOT.war"??
Because I think there is a special naming convention for the root
context.
This means if you have different applications you need to deploy them
into different folders.

Karl-Heinz

----- Original Message -----
From: "Ben Rometsch" <[EMAIL PROTECTED]>
To: <tomcat-user@jakarta.apache.org>
Sent: Friday, June 10, 2005 10:34 PM
Subject: Managing automatic deployment with multiple virtual hosts


Hi There,

I am running Tomcat 5.5.9 in production, using 1 tomcat instance to
service several websites (each with their own hostname) via virtual
hosts. I have Apache 2 running in front of Tomcat, connecting via
mod_jk.

I am having OutOfMemory issues, and have noticed that, due to my webapps
structure, I appear to be deploying 2 instances of each site. When I
look in the manager application I see the following in the Application

List:

www.sitea.com/
localhost/sitea

www.siteb.com/
localhost/siteb

www.sitec.com/
localhost/sitec

Etc. etc. My current directory structure is simply placing the war files
for each application into the tomcat/webapps folder. I then add a <Host>
declaration in the server.xml file for each virtual host:

<Host name="www.sitea.com">

<Context path="" docBase="/opt/tomcat/webapps/sitea" debug="0"

reloadable="true"/>

</Host>

<Host name="www.siteb.com">

<Context path="" docBase="/opt/tomcat/webapps/siteb" debug="0"

reloadable="true"/>

</Host>

<Host name="www.sitec.com">

<Context path="" docBase="/opt/tomcat/webapps/sitec" debug="0"

reloadable="true"/>

</Host>

I still have the localhost set up in the server.xml file:

<Host name="localhost" appBase="webapps" unpackWARs="true"

autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">

I presume this is the culprit. The problem I am having is that I cant
figure out how to get Tomcat to auto-deploy war files without then
creating a second running instance in memory with a context path of
/sitea. I've tried a variety of different directory structures, but am
unable to deploy a war file without it correctly deploying to a / path,
and thus not consuming more memory within the VM.

Is there a best practise way of doing this? Should I be putting
context.xml declarations in the META-INF directory of my war files?

Thanks in advance,

Ben


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


        

        
                
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier
anmelden: http://mail.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to