tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <>
Subject Re: change in local directory deployment behavior between 5.5 and 6
Date Mon, 16 Jul 2007 12:17:44 GMT

----- Original Message ----- 
From: "Alice Young" <>
To: <>
Sent: Sunday, July 15, 2007 5:47 PM
Subject: change in local directory deployment behavior between 5.5 and 6

> Hi,
>  I have been searching for a solution to this problem for a while, but 
> it's difficult to search on when the keywords match so many general 
> topics.
>  In tomcat 5.5, I was able to use manager to deploy from a directory on 
> the filesystem, and tomcat would use that directory for the source. It 
> would not copy the contents of the directory to its webapps directory. I 
> could stop tomcat, start it again and pick up changes in the class files 
> of the app. This was very quick because no file copying was going on.
>  In tomcat 6, it now copies all of the files to the webapps directory. I 
> can no longer just stop and restart tomcat to pick up the changes in the 
> class files because tomcat has its own copy. I have to undeploy and 
> redeploy at minimum, and it takes quite some time and extra work on my 
> part.
>  Is there a way to configure tomcat 6 get the old tomcat 5.5 behavior 
> back? Thanks for any help.
>  Alice

Hi Alice.... how were you actually deploying it? Using an IDE, ant, HTTP?
It doesnt actually look like its changed much from 5.5 to 6... so it may 
just be the tool thats doing it different with TC6?

Anyway let me show you how I do it.... once you have this ant script setup, 
its so handy, you cant live without it.
It just so happens its actually setup now for what you need....
If my notes are not clear... the trick is just to setup the context.xml with 
its "own docBase location"... in the unpacked web app in one of your 
Then when you run this ant script... TC will use that unpacked webapp... 
just point config at the context in the webapp.

Have fun....

<project name="Deployer" default="deploy" basedir=".">

  <path id="deployer.classpath">
    <fileset dir="${basedir}/lib">
      <include name="*.jar"/>

  <taskdef resource="org/apache/catalina/ant/catalina.tasks"

  <!-- point url at manager
     change username and password to Tomcat Admin
     war - is the path to the thing you trying to install
     dont change update - it makes it undeploy existing first
     path - is the Context (the uri you want it to be)
     config - points via a context file that will be used as the docbase
      if you use config you dont use war or localWar
      ie it will point tc at the existing installation that you have at that 
      - ie context.xml looks like this -
        <?xml version="1.0" encoding="UTF-8"?>
        <Context docBase="D:\GARBAGE\TestSite" path="/Ignored"/>

     localWar - will move the contents of your unpacked web app to tc

     In Netbeans right click and run task 'deploy'

     If you dont like ant then this will also work

  <!-- sample configs
  <target name="deploy" description="Deploy web application">
    <deploy url="http://localhost:8080/manager" username="admin" password=""

  <!-- MAKE a simple java application
       make a "lib" folder under the application folder

       They are all in your Tomcat Libs....

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message