Ant install and deploy do not update the webapps dir (look in the work subdir hierarchy for the files). So if you have placed an app in webapps, then conflicts will occur when using the Ant tasks (e.g. problems for starting, as Tomcat will already have been running it from webapps).
So, do not combine usage of the Ant tasks and copying to webapps! I suggest using the deploy task to deploy the war from your build's distributables directory. > -----Original Message----- > From: Paul Campbell [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 22, 2003 10:28 AM > To: [EMAIL PROTECTED] > Subject: Tomcat 5 and Ant install/reload/remove > > > Following the docs for the deployment process I created a > simple HelloWorld > servlet. > > I cannot be certain, but I believe, proir to running ant > install, I manually > copied the servlet directory to TOMCAT/webapps/HelloWorld. > After running ant > install the servlet ran perfectly. > > However, modifting the development copy of the srevlet and > rerunning ant > install produced no effect. > > I deleted the TOMCAT/webapps/HelloWorld directory and ran > "ant remove clean all > install". All reported fine, but NO evidence of anything on > TOMCAT/webapps/ > > I double check the server has write access and it does. I > eventually manually > copied the contents of HelloWorld/build to TOMCAT/webapps/ > and renamed it > HelloWorld. Nothing. I reran ant install and it said, OK. > Servlet Not > Avaliable or 404 errors was all I could get. > > I can not get the ant install to work at all. It registers > it with the > manager, but that is it. > > To get subsequent versions even after minor edits to work, I > need to... > > ant compile > cp build/* -r /opt/tomcat/webapps/HelloWorld > ant install > /opt/tomcat/bin/shutdown.sh > [ .. wait 20 seconds .. ] > ps ax > possibly: /opt/tomcat/bin/shutdown.sh again > > /opt/tomcat/bin/startup.sh > [ takes over a minute to restart ] > > Finally the app works. > > Unless I am doing something wrong, this conflicts with the > documentation on the > deployment process that states all you need to do to get the > app running > temporarily on the server during development is to run ant install. > > Any help and advice would be very greatfully recieved. Thanks. > > -- > > Paul Campbell > > Campbell Multimedia > Web Design | PC Sales > +=======================================+ > [ WWW: http://campbell-multimedia.com ] > [ Tel: 07970 510549 ] > [ Email: [EMAIL PROTECTED] ] > +=======================================+ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
