----- Original Message -----
From: "Alice Young" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
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
folders.
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"/>
</fileset>
</path>
<taskdef resource="org/apache/catalina/ant/catalina.tasks"
classpathref="deployer.classpath"/>
<!-- 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
docBase
- 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
http://localhost:8080/manager/deploy?config=file://D:\\GARBAGE\\TestSite\\META-INF\\context.xml&path=/Test88
-->
<!-- sample configs
war="D:\\DEV\\PROJECTS\\TestRemoteIp\\dist\\TestRemoteIp.war"
config="D:\\GARBAGE\\TestSite\\META-INF\\context.xml"
localWar="file://D:\\GARBAGE\\TestSite"
-->
<target name="deploy" description="Deploy web application">
<deploy url="http://localhost:8080/manager" username="admin" password=""
path="/Test5"
update="true"
config="file://D:\\GARBAGE\\TestSite\\META-INF\\context.xml"
/>
</target>
</project>
<!-- MAKE a simple java application
make a "lib" folder under the application folder
add
catalina-ant.jar
catalina-deployer.jar
el-api.jar
jasper.jar
jasper-el.jar
jsp-api.jar
servlet-api.jar
tomcat-juli.jar
They are all in your Tomcat Libs....
-->
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]