Virtual Host and dynamic webapp reloading

2007-09-25 Thread Daniel M Garland

Hello,

I have a virtual host configured on my Tomcat 5.5.20 cluster installation.

In my server.xml, I have

autoDeploy="true">


And yet if I copy in a new war file (I'm using ant's deploy task) I 
don't see any changes to my webapp. If I look at the individual server's 
webapp via the manager application, I see the changes; but I don't see 
any changes by looking at the virtual host address until I restart Tomcat.


Why?

Thanks in advance.
Dan Garland
[EMAIL PROTECTED]

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Host and dynamic webapp reloading

2007-09-25 Thread Pid
Daniel M Garland wrote:
> Hello,
> 
> I have a virtual host configured on my Tomcat 5.5.20 cluster installation.
> 
> In my server.xml, I have
> 
>  autoDeploy="true">

What config do you have in your Context(s)?

p

> And yet if I copy in a new war file (I'm using ant's deploy task) I
> don't see any changes to my webapp. If I look at the individual server's
> webapp via the manager application, I see the changes; but I don't see
> any changes by looking at the virtual host address until I restart Tomcat.
> 
> Why?
> 
> Thanks in advance.
> Dan Garland
> [EMAIL PROTECTED]
> 
> __
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> __
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Host and dynamic webapp reloading

2007-09-26 Thread Daniel M Garland

My full  element then:

autoDeploy="true">

 
 debug="0" />

 www.myvirtualhost.com
 subdomain.myvirtualhost.com

 className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"


managerClassName="org.apache.catalina.cluster.session.DeltaManager"
 expireSessionsOnShutdown="false"
 useDirtyFlag="true"
 notifyListenersOnReplication="true">







className="org.apache.catalina.cluster.tcp.ReplicationValve"


filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.css;.*\.txt;"/>

className="org.apache.catalina.cluster.session.ClusterSessionListener"/>


  

Any ideas?

Pid wrote:

Daniel M Garland wrote:

Hello,

I have a virtual host configured on my Tomcat 5.5.20 cluster installation.

In my server.xml, I have




What config do you have in your Context(s)?

p


And yet if I copy in a new war file (I'm using ant's deploy task) I
don't see any changes to my webapp. If I look at the individual server's
webapp via the manager application, I see the changes; but I don't see
any changes by looking at the virtual host address until I restart Tomcat.

Why?

Thanks in advance.
Dan Garland
[EMAIL PROTECTED]

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__




__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Host and dynamic webapp reloading

2007-09-26 Thread Pid
Daniel M Garland wrote:
> My full  element then:

yeah...

remove the context defs from server.xml and put them in
META-INF/context.xml, which is a dir/file inside your webapp.

this method of defining contexts is not encouraged, because you have to
restart the server to reload the config, amongst other reasons.

the default web app is called ROOT.war, your other one would be
asmalljspapp.war. put both files in the appBase dir.

when it unpacks, it'll drop the contexts like so:

appBase/ROOT/META-INF/context.xml
appBase/asmalljspapp/META-INF/context.xml

i strongly recommend that you have a read of the Context config stuff in
the docs.  you'll need to set reloadable="true".

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


p



>  autoDeploy="true">
>  
>   debug="0" />
>  www.myvirtualhost.com
>  subdomain.myvirtualhost.com
> 
>   className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
> 
> managerClassName="org.apache.catalina.cluster.session.DeltaManager"
>  expireSessionsOnShutdown="false"
>  useDirtyFlag="true"
>  notifyListenersOnReplication="true">
> 
>  className="org.apache.catalina.cluster.mcast.McastService"
> mcastAddr="228.0.0.5"
> mcastPort="45565"
> mcastFrequency="500"
> mcastDropTime="3000"/>
> 
>  
> className="org.apache.catalina.cluster.tcp.ReplicationListener"
> tcpListenAddress="10.78.1.43"
> tcpListenPort="4002"
> tcpSelectorTimeout="100"
> tcpThreadCount="6"/>
> 
>  
> className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
> replicationMode="pooled"
> ackTimeout="15000"
> stateTransferTimeout="45"
> waitForAck="true"/>
> 
>  className="org.apache.catalina.cluster.tcp.ReplicationValve"
> 
> filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.css;.*\.txt;"/>
> 
>  className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
> 
>   
> 
> Any ideas?
> 
> Pid wrote:
>> Daniel M Garland wrote:
>>> Hello,
>>>
>>> I have a virtual host configured on my Tomcat 5.5.20 cluster
>>> installation.
>>>
>>> In my server.xml, I have
>>>
>>> >> autoDeploy="true">
>>
>> What config do you have in your Context(s)?
>>
>> p
>>
>>> And yet if I copy in a new war file (I'm using ant's deploy task) I
>>> don't see any changes to my webapp. If I look at the individual server's
>>> webapp via the manager application, I see the changes; but I don't see
>>> any changes by looking at the virtual host address until I restart
>>> Tomcat.
>>>
>>> Why?
>>>
>>> Thanks in advance.
>>> Dan Garland
>>> [EMAIL PROTECTED]
>>>
>>> __
>>> This email has been scanned by the MessageLabs Email Security System.
>>> For more information please visit http://www.messagelabs.com/email
>>> __
>>>
>>> -
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> __
>> This email has been scanned by the MessageLabs Email Security System.
>> For more information please visit http://www.messagelabs.com/email
>> __
>>
> 
> __
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> __
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Virtual Host and dynamic webapp reloading

2007-09-26 Thread Caldarale, Charles R
> From: Daniel M Garland [mailto:[EMAIL PROTECTED] 
> Subject: Re: Virtual Host and dynamic webapp reloading
> 
> 

One other problem: docBase must point to the same directory as appBase.
The result is endless confusion within Tomcat.

 - 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]



Re: Virtual Host and dynamic webapp reloading

2007-09-26 Thread Daniel M Garland
I've gotta say I've had a miserable time with this one. I've tried 
nearly permutation of configurations in the Tomcat documentation and 
nothing seems to work; either I get the default host or a white blank 
screen.


What I need is for www.mydomain.com to host mywebapp on the default path 
and anotherapp on path /anotherapp


If I have this setup in server.xml, everything works:

...

  
  
...

However, to get the dynamic webapp reloading I've been recommended to 
move my  elements out of server.xml. As I am running muliple 
virtual hosts I understand that I cannot use conf/context.xml because 
this applies to all hosts.

So I have tried each of the following, without success:
- creating a conf/Catalina/mydomain.com/mywebapp.xml
- creating a conf/Catalina/mydomain.com/ROOT.xml
- creating a conf/Catalina/mydomain.com/context.xml
- creating a conf/Catalina/mydomain.com/context.xml.default
- creating a META-INF/context.xml in the web app (although I'd prefer to 
sort this out within Tomcat anyway)


I've also tried several variations on the docBase: ".", "mywebapp", the 
absolute path, the absolute path to the .war file...


I mean, why wouldn't this work?
in conf/server.xml:

in conf/Catalina/mydomain.com/mywebapp.xml:


Any ideas on how I can achieve the equivalent of my working server.xml 
with nested Contexts in some other file?

Regards
Dan Garland

Pid wrote:

Daniel M Garland wrote:

My full  element then:


yeah...

remove the context defs from server.xml and put them in
META-INF/context.xml, which is a dir/file inside your webapp.

this method of defining contexts is not encouraged, because you have to
restart the server to reload the config, amongst other reasons.

the default web app is called ROOT.war, your other one would be
asmalljspapp.war. put both files in the appBase dir.

when it unpacks, it'll drop the contexts like so:

appBase/ROOT/META-INF/context.xml
appBase/asmalljspapp/META-INF/context.xml

i strongly recommend that you have a read of the Context config stuff in
the docs.  you'll need to set reloadable="true".

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


p





 
 
 www.myvirtualhost.com
 subdomain.myvirtualhost.com

 











  

Any ideas?

Pid wrote:

Daniel M Garland wrote:

Hello,

I have a virtual host configured on my Tomcat 5.5.20 cluster
installation.

In my server.xml, I have



What config do you have in your Context(s)?

p


And yet if I copy in a new war file (I'm using ant's deploy task) I
don't see any changes to my webapp. If I look at the individual server's
webapp via the manager application, I see the changes; but I don't see
any changes by looking at the virtual host address until I restart
Tomcat.

Why?

Thanks in advance.
Dan Garland
[EMAIL PROTECTED]

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__




__
This email has been scanned by the Messa

Re: Virtual Host and dynamic webapp reloading

2007-09-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dan,

Daniel M Garland wrote:
>unpackWars="true" autoDeploy="true">
>   
>   

That docBase="." is going to give you nothing but trouble. Why can't you
just do this:

1. Start with a clean install of Tomcat.
2. Modify CATALINA_HOME/conf/server.xml to include your clustering
   configuration.
3. Drop ROOT.war into CATALINA_HOME/webapps
4. Drop anotherapp.was into CATALINA_HOME/webapps
5. Start up Tomcat

This should work. You don't need any crazy configuration. Your 
configuration should be in META-INF/context.xml in each of your WAR files.

Tell me more about your virtual host configuration. Do you actually need
Tomcat to understand your virtual hosts? Or, is it sufficient to have
all applications available to all host names?

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG+n5l9CaO5/Lv0PARAo1aAJ9umVYb/ikB/9BMuzTP+DOHSAIF8gCbBLS5
mib6X4Uo/BvMMMP7tL6L30k=
=gz0h
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Host and dynamic webapp reloading

2007-09-26 Thread Daniel M Garland

Hi Chris,

I have three virtual hosts that I want to have hosting a webapp on the 
default path. Each host has a few aliases for subdomains etc. So I don't 
really want to have ROOT.war in CATALINA_HOME/webapps, partly because I 
want to keep the manager app and partly because I would have a ROOT.war 
files for each host, so I think you're saying


CATALINA_HOME/webapps
 /myapp1/ROOT
 /myapp2/ROOT
 /myapp3/ROOT

So I would've thought that I'd have the appBase of each host be 
myappX/ROOT, but what would the corresponding context.xml be? Does it 
actually work holding this file in /conf, I'm not sure about having this 
in the webapp, is it standard to have a META-INF/context.xml or is that 
a Tomcat thing?


Thanks for all the input so far folks


Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dan,

Daniel M Garland wrote:


  
  


That docBase="." is going to give you nothing but trouble. Why can't you
just do this:

1. Start with a clean install of Tomcat.
2. Modify CATALINA_HOME/conf/server.xml to include your clustering
   configuration.
3. Drop ROOT.war into CATALINA_HOME/webapps
4. Drop anotherapp.was into CATALINA_HOME/webapps
5. Start up Tomcat

This should work. You don't need any crazy configuration. Your 
configuration should be in META-INF/context.xml in each of your WAR files.

Tell me more about your virtual host configuration. Do you actually need
Tomcat to understand your virtual hosts? Or, is it sufficient to have
all applications available to all host names?

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG+n5l9CaO5/Lv0PARAo1aAJ9umVYb/ikB/9BMuzTP+DOHSAIF8gCbBLS5
mib6X4Uo/BvMMMP7tL6L30k=
=gz0h
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__




__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Host and dynamic webapp reloading

2007-09-26 Thread Pid
Daniel M Garland wrote:
> I've gotta say I've had a miserable time with this one. I've tried
> nearly permutation of configurations in the Tomcat documentation and
> nothing seems to work; either I get the default host or a white blank
> screen.

You're almost certainly mixing the remnants of the various configuration
changes that you've made.

> What I need is for www.mydomain.com to host mywebapp on the default path
> and anotherapp on path /anotherapp

(see below)

> If I have this setup in server.xml, everything works:
> 
> ...
>unpackWars="true" autoDeploy="true">
>   
>   
> ...

Remove those Context definitions.

> However, to get the dynamic webapp reloading I've been recommended to
> move my  elements out of server.xml. As I am running muliple
> virtual hosts I understand that I cannot use conf/context.xml because
> this applies to all hosts.
> So I have tried each of the following, without success:
> - creating a conf/Catalina/mydomain.com/mywebapp.xml
> - creating a conf/Catalina/mydomain.com/ROOT.xml
> - creating a conf/Catalina/mydomain.com/context.xml
> - creating a conf/Catalina/mydomain.com/context.xml.default
> - creating a META-INF/context.xml in the web app (although I'd prefer to
> sort this out within Tomcat anyway)
> 
> I've also tried several variations on the docBase: ".", "mywebapp", the
> absolute path, the absolute path to the .war file...
> 
> I mean, why wouldn't this work?

(see above)

> in conf/server.xml:
> 
> in conf/Catalina/mydomain.com/mywebapp.xml:
> 
> 
> Any ideas on how I can achieve the equivalent of my working server.xml
> with nested Contexts in some other file?
> Regards
> Dan Garland

Yes, as I said before...

1. Remove the context definitions from the server.xml.
2. You must not define multiple Contexts in conf/context.xml.
3. Do not define conf/Catalina/mydomain.com/.xml.
4. Do not use the path or docBase outside of server.xml.
5. Start with a fresh configuration, to ensure you aren't mixing configs
in your rush to solve the problem.
6. Include a META-INF/context.xml with your context config in the WAR.
Check that it's there by unzipping a copy of the WAR.
7. Don't forget to include the reloadable="true" settings in the context.
8. Just install the ROOT war, then configure the remaining app(s). One
thing at a time.  Tomcat will auto-deploy and copy the configs into
conf/Catalina/host/




Place the default app like so:

your/apps/ROOT.war


If this doesn't deploy/start up, check your log files and look for
errors in catalina.out and any app-local logs.

Post the file system layout after deployment, the actual context you
deployed in the war, and your current server.xml.



> Pid wrote:
>> Daniel M Garland wrote:
>>> My full  element then:
>>
>> yeah...
>>
>> remove the context defs from server.xml and put them in
>> META-INF/context.xml, which is a dir/file inside your webapp.
>>
>> this method of defining contexts is not encouraged, because you have to
>> restart the server to reload the config, amongst other reasons.
>>
>> the default web app is called ROOT.war, your other one would be
>> asmalljspapp.war. put both files in the appBase dir.
>>
>> when it unpacks, it'll drop the contexts like so:
>>
>> appBase/ROOT/META-INF/context.xml
>> appBase/asmalljspapp/META-INF/context.xml
>>
>> i strongly recommend that you have a read of the Context config stuff in
>> the docs.  you'll need to set reloadable="true".
>>
>> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>
>>
>> p
>>
>>
>>
>>> >> autoDeploy="true">
>>>  
>>>  >> debug="0" />
>>>  www.myvirtualhost.com
>>>  subdomain.myvirtualhost.com
>>>
>>>  >> className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
>>>
>>> managerClassName="org.apache.catalina.cluster.session.DeltaManager"
>>>  expireSessionsOnShutdown="false"
>>>  useDirtyFlag="true"
>>>  notifyListenersOnReplication="true">
>>>
>>> >>
>>> className="org.apache.catalina.cluster.mcast.McastService"
>>> mcastAddr="228.0.0.5"
>>> mcastPort="45565"
>>> mcastFrequency="500"
>>> mcastDropTime="3000"/>
>>>
>>> >>
>>> className="org.apache.catalina.cluster.tcp.ReplicationListener"
>>> tcpListenAddress="10.78.1.43"
>>> tcpListenPort="4002"
>>> tcpSelectorTimeout="100"
>>> tcpThreadCount="6"/>
>>>
>>> >>
>>> className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
>>> replicationMode="pooled"
>>> ackTimeout="15000"
>>> stateTransferTimeout="45"
>>> waitForAck="true"/>
>>>
>>> >> className="org.apache.catalina.cluster.tcp.ReplicationValve"
>>>
>>> filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.css;.*\.txt;"/>
>>>
>>> >> className="org.apache.catalina.cluster.session.ClusterSessionLi

Re: Virtual Host and dynamic webapp reloading

2007-09-26 Thread Hassan Schroeder
On 9/26/07, Daniel M Garland <[EMAIL PROTECTED]> wrote:

> So I would've thought that 

Have you read this?



-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Host and dynamic webapp reloading

2007-09-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dan,

Daniel M Garland wrote:
> I have three virtual hosts that I want to have hosting a webapp on
> the default path.

Different apps, or the same app on each virtual host?

> Each host has a few aliases for subdomains etc. So I don't really
> want to have ROOT.war in CATALINA_HOME/webapps, partly because I want
> to keep the manager app and partly because I would have a ROOT.war 
> files for each host.

You can deploy the manager app even when there is a ROOT application
deployed.

> so I think you're saying
> 
> CATALINA_HOME/webapps
>   /myapp1/ROOT
>   /myapp2/ROOT
>   /myapp3/ROOT

Well, I didn't say that, but if I had said something like that, I would
have suggested:

CATALINA_HOME/webapps (contains nothing)

VIRTUAL_HOME/www.domain1.com[/webapps]
ROOT
myapp1
myapp2
...

VIRTUAL_HOME/www.domain2.com[/webapps]
ROOT
myapp1
myapp2
...

You will need separate  elements in your server.xml file. The
"appBase" for each of these should be VIRTUAL_HOST/www.[whatever].com,
or whatever you choose to be your directory layout.

If you are deploying all the same applications on all virtual hosts,
then you can ignore the whole virtual host concept and just use a
default host to serve everything regardless of the hostname.

> So I would've thought that I'd have the appBase of each host be 
> myappX/ROOT

No, no no. The "appBase" tells Tomcat where to look for deployable
applications, not the directory where /index.html should be found. This
is NOT the same thing as DocumentRoot in Apache httpd. Shave off the
ROOT and you've got yourself a decent configuration. If there is a
directory called ROOT (or a WAR file called ROOT.war) in the appBase
directory, /that/ application will be used as the one that is deployed
with no context path (i.e on / instead of /myapp).

> but what would the corresponding context.xml be?

The context.xml file should not contain any path information whatsoever.
All you need is JNDI resources, realm configuration and stuff like that.
This is a perfectly good context.xml file:



You don't need anything else unless your application needs special
configuration. If you don't have anything in your context.xml file, you
can even leave it out, since Tomcat will give you the default deployment
configuration (which is an empty config).

> Does it actually work holding this file in /conf, I'm not sure about
> having this in the webapp, is it standard to have a
> META-INF/context.xml or is that a Tomcat thing?

This is a Tomcat thing only.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG+ol+9CaO5/Lv0PARAkpzAKCLVOu23XOa63lHvEMIvOOSe/DNSACfUa7m
U9DbG+9+gn2Q6mXVcI759Pc=
=b2Kr
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Host and dynamic webapp reloading [SOLVED]

2007-09-27 Thread Daniel M Garland
Thanks to all for your responses and advice, from this I have now 
addressed the problem by using an alternative configuration. For the 
record heres what I did:


- I ended up creating a completely different folder for my webapps. I 
created subdirectories for each virtual host, rather than having all my 
virtual host's web applications inside $CATALINA_HOME/webapps, and set 
the appBase in server.xml's  element to match this.
- I had my ant script generate a ROOT.war instead of the project name 
and dumped this .war in my new appBase/domain/ directory.

- I set unpackWars and autoDeploy to true on each Host
- I created a META-INF/context.xml in my web app (as I needed to do some 
config on the context)


Now whenever I drop a new web app in using the catalina ant deploy task 
the changes are reflected. So I suppose the punchline is don't bung all 
your webapps in the default folder and try to use  elements, 
but break them into seperate folders, and use ROOT.war if you want to 
host off the default context ("/").


thanks everyone!


Daniel M Garland wrote:

Hello,

I have a virtual host configured on my Tomcat 5.5.20 cluster installation.

In my server.xml, I have

autoDeploy="true">


And yet if I copy in a new war file (I'm using ant's deploy task) I 
don't see any changes to my webapp. If I look at the individual server's 
webapp via the manager application, I see the changes; but I don't see 
any changes by looking at the virtual host address until I restart Tomcat.


Why?

Thanks in advance.
Dan Garland
[EMAIL PROTECTED]

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__




__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]