tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid...@pidster.com>
Subject Re: Virtual Host and dynamic webapp reloading
Date Wed, 26 Sep 2007 09:03:30 GMT
Daniel M Garland wrote:
> My full <host> 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



> <Host name="mydomain.com" appBase="webapps/mywebapp" unpackWars="true"
> autoDeploy="true">
>          <Context path="" docBase="." debug="0" cookies="false" />
>          <Context path="/asmalljspapp" docBase="../smalljspapp"
> debug="0" />
>          <Alias>www.myvirtualhost.com</Alias>
>          <Alias>subdomain.myvirtualhost.com</Alias>
> 
>          <Cluster
> className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
> 
> managerClassName="org.apache.catalina.cluster.session.DeltaManager"
>                  expireSessionsOnShutdown="false"
>                  useDirtyFlag="true"
>                  notifyListenersOnReplication="true">
> 
>             <Membership
>                 className="org.apache.catalina.cluster.mcast.McastService"
>                 mcastAddr="228.0.0.5"
>                 mcastPort="45565"
>                 mcastFrequency="500"
>                 mcastDropTime="3000"/>
> 
>             <Receiver
> 
> className="org.apache.catalina.cluster.tcp.ReplicationListener"
>                 tcpListenAddress="10.78.1.43"
>                 tcpListenPort="4002"
>                 tcpSelectorTimeout="100"
>                 tcpThreadCount="6"/>
> 
>             <Sender
> 
> className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
>                 replicationMode="pooled"
>                 ackTimeout="15000"
>                 stateTransferTimeout="45"
>                 waitForAck="true"/>
> 
>             <Valve
> className="org.apache.catalina.cluster.tcp.ReplicationValve"
> 
> filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.css;.*\.txt;"/>
> 
>             <ClusterListener
> className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
>         </Cluster>
>       </Host>
> 
> 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
>>>
>>> <Host name="mydomain.com" appBase="webapps/mywebapp" unpackWars="true"
>>> 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
>>> daniel.garland@NO-SPAMtitanemail.com
>>>
>>> ______________________________________________________________________
>>> 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: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>> ______________________________________________________________________
>> 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


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


Mime
View raw message