You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gregor Schneider <rc...@googlemail.com> on 2008/12/08 21:48:28 UTC

Again: Autodeploy in Tomcat 6

Good evening,

I thought I understood the autodeploy-feature. howver...

I've started to move away from Tomcat 5.5 towards 6.0, and created my
virtual hosts as suggested in the docs:

I've created

- ${catalina.home}/example.com (directory)
- ${catalina.home}/example.com/META-INF (directory, no context.xml yet)

I've move the whole ${catalina.home}/webapps recursively to
${catalina.home}/example.com/webapps

So far, so good, the Tomcat-startup-page comes up nicely (the ROOT-application)

Next, I put a webapp (roller.war) into ${catalina.home}/webapps -
awaiting deployment....

Well, as you're guessing: Nothing is happening here, nada, niente,
rien, nickese...

My ${catalina.home}/config/server.xml looks like this (excerpt):

    <Engine name="Catalina" defaultHost="example.com">

      <Host name="example.com"  appBase="${catalina.home}/example.com/webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

      </Host>

I'm running a fresh installation of Tomcat 6 from tomcat.apache.org on
Debian Etch, Using jsvc & APR (which works nicely) and Sun's Java
build 1.6.0_11-b03

The rights of said roller.war-file are:

-rw-r--r--  1 tomcat tomcat 24025726 2008-12-08 21:33 roller.war

Obviously, the domain example.com in my files here is my own domain,
DNS is fine, host gets resolved from my box and from outside.

Could somebody please let me know what I'm missing here?

TIA

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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


Re: Again: Autodeploy in Tomcat 6

Posted by Gregor Schneider <rc...@googlemail.com>.
Hi Chuck,

everything's working fine now.

That was what I missed:

On Mon, Dec 8, 2008 at 11:22 PM, Caldarale, Charles R
<Ch...@unisys.com> wrote:
>
> Note that autoDeploy is effective only for webapps added while Tomcat is running; it's the deployOnStartup attribute that determines what happens during Tomcat initialization.
>

Thanks again!

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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


RE: Again: Autodeploy in Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Gregor Schneider [mailto:rc46fi@googlemail.com]
> Subject: Re: Again: Autodeploy in Tomcat 6
>
> actually, I put roller.war into ${catalina.home}/example.com/webapps

O.k., that's good, and your server.xml appears to be o.k. as well.  I'll assume you restarted Tomcat after making the changes to server.xml.

Note that autoDeploy is effective only for webapps added while Tomcat is running; it's the deployOnStartup attribute that determines what happens during Tomcat initialization.

Have you looked in the logs to see if there were errors during deployment of the roller webapp?

Going back to your original message:

> I've created
> - ${catalina.home}/example.com (directory)
> - ${catalina.home}/example.com/META-INF (directory, no context.xml yet)

There shouldn't be a META-INF directory under your appBase; Tomcat will treat that as a webapp named META-INF.  The META-INF directory should be inside each webapp that needs one.

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Again: Autodeploy in Tomcat 6

Posted by Gregor Schneider <rc...@googlemail.com>.
Duuh..  sorry for the misunderstanding:

On Mon, Dec 8, 2008 at 10:39 PM, Caldarale, Charles R
<Ch...@unisys.com> wrote:
>> From: Gregor Schneider [mailto:rc46fi@googlemail.com]
>> Subject: Again: Autodeploy in Tomcat 6
>>
>> Next, I put a webapp (roller.war) into ${catalina.home}/webapps -
>> awaiting deployment....
>
> Since you've redefined the appBase to example.com, nobody's looking at the old appBase directory.  What happens if you put roller.war into ${catalina.home}/example.com/webapps instead?
>
 actually, I put roller.war into ${catalina.home}/example.com/webapps

sorry for the misunderstanding, seems to have been a long day....

> BTW, if you have only a single <Host> element, there's no reason to change the name; all requests will be delivered there.
>

i know, however, this is just my first virtual host - more to come

> If you have multiple <Host> elements, then post all of your server.xml file.

For now, it's the only <Host>-element in the server.xml-file

To give you the complete picture, this is my original server.xml
(comments included, domain-names changed):

<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="8022" shutdown="somePassword">

  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
  <!--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener" />
  <!-- JMX Support for the Tomcat server. Documentation at
/docs/non-existent.html -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
/>

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <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="80" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- 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 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />


    <!-- 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="example.com">

      <!--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="example.com"  appBase="${catalina.home}/example.com/webapps"
            unpackWARs="true" autoDeploy="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='example.com.access-'
                        suffix='.log'
                        pattern='%B %H %m %q %r %s %S %t %u %U'
                        resolveHosts='false'/>
      </Host>
    </Engine>
  </Service>
</Server>

Do you see any mistake here?

TIA

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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


RE: Again: Autodeploy in Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Gregor Schneider [mailto:rc46fi@googlemail.com]
> Subject: Again: Autodeploy in Tomcat 6
>
> Next, I put a webapp (roller.war) into ${catalina.home}/webapps -
> awaiting deployment....

Since you've redefined the appBase to example.com, nobody's looking at the old appBase directory.  What happens if you put roller.war into ${catalina.home}/example.com/webapps instead?

BTW, if you have only a single <Host> element, there's no reason to change the name; all requests will be delivered there.

If you have multiple <Host> elements, then post all of your server.xml file.

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org