From
\conf\Catalina\localhost   appName.xml

<Context reload="true" antiJARLocking="true" unpackWARs="true">
<Realm appName="xxWeb" className="org.apache.catalina.realm.JAASRealm" 
debug="99" userClassNames="Webxx.LoginPrincipal" allRolesMode="strictAuthOnly" 
/>
</Context>

From
\conf   server.xml

<Service name="Catalina">
  
    <!--The connectors can use a shared executor, you can define one or more 
named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" 
        maxThreads="150" minSpareThreads="4"/>
    -->
    
    
    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8102" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />
    -->           
    <!-- Define a SSL HTTP/1.1 Connector on port 8443
         This connector uses the JSSE configuration, when using APR, the 
         connector should be using the OpenSSL style configuration
         described in the APR documentation -->
 <!--
    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
 -->

    <!-- Define an AJP 1.3 Connector on port xxxx -->
    <Connector port="8109" protocol="AJP/1.3" redirectPort="443"
         />


    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">         
    --> 
    <Engine name="Catalina" defaultHost="localhost">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->        

      <!-- The request dumper valve dumps useful debugging information about
           the request and response data received and sent by Tomcat.
           Documentation at: /docs/config/valve.html -->
      <!--
      <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
      -->

      <!-- This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.  -->
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>



      <!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       -->
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" xmlValidation="false" xmlNamespaceAware="false">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" 
directory="logs"  
               prefix="localhost_access_log." suffix=".txt" pattern="common" 
resolveHosts="false"/>
        -->

      </Host>
    </Engine>
  </Service>


-----Original Message-----
From: Pid [mailto:p...@pidster.com]
Sent: Thursday, February 11, 2010 5:17 PM
To: Tomcat Users List
Subject: Re: Re-deploying a war file


On 10/02/2010 16:31, Joe Wallace wrote:
> I have been working with Tomcat 6.0.20 running as a windows service for about 
> a year.
 > I update the application war file every few months.

OK.

> After reading  the Tomcat 6.0 User Guide, Section 4, Deployer -Deploying on a 
> running war
 >Tomcat I expected to be able to just drop the updated war file into 
the web apps folder,
> overwriting the old war file of the same name and it would automatically 
> replace the
> previously exploded war with the new.

Yep.

> The document says, 'If the Host autoDeploy attribute is "true", the Host will 
> attempt
> to deploy and update web applications dynamically, as needed, for example if 
> a new .WAR
> is dropped into the appBase. For this to work, the Host needs to have 
> background
> processing enabled which is the default configuration'. I could not get this 
> to happen.

Please post your server.xml.  N.B. removing any passwords & editing out 
the comments is a good idea.

> The new war would not re-deploy while Tomcat was running and would not 
> re-deploy after
> restarting Tomcat. I then read the Tomcat Configuration Reference, Context 
> section and
> followed the link to Automatic Application Deployment where I read the 
> following,
> 'If you redeploy an updated WAR file, be sure to delete the expanded 
> directory when
> restarting Tomcat, so that the updated WAR file will be re-expanded (note 
> that the
> auto deployer, if enabled, will automatically expand the updated WAR file 
> once the
> previously expanded directory is removed).'
> I tried this and it does exactly what I wanted, so that is what I have been 
> doing.
> Can someone enlighten me on my confusion between the two sets of instructions.

This works for me, just by replacing the WAR file with a new one - maybe 
there's something in your config, or the web app is holding onto JARs & 
stopping the app from being replaced.


p

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to