Obviously you should try to figure out who is using that file. But if you want to do it like old days.. Do this in your ANT
<property name="service" value="Tomcat5"/> <target name="stop" description="Stops the ${service}"> <exec executable="cmd.exe"> <arg line="/C net stop ${service}"/> </exec> </target> <target name="start" description="Starts the ${service}"> <exec executable="cmd.exe"> <arg line="/C net start ${service}"/> </exec> </target> If is linux you will do a service start tomcatd or service stop tomcatd regards -----Original Message----- From: Lenny Wintfeld [mailto:[EMAIL PROTECTED] Sent: Monday, July 30, 2007 5:16 PM To: Asensio, Rodrigo Subject: RE: Quesion on starting tomcat (as a windows service) from Ant Rodrigo Thanks for the feedback. As it works out, when I drop the war into ....\webapps, tomcat partially deletes the previous version in the directory below webapps and then can't proceed. The problem is log4j.properties is being used by another (at this point unknown) app (definitely not one of mine). The end result is Tomcat remains running with a partially deleted web app and no way to deploy that app. The only way to fix the problem is to stop tomcat delete the offending web app's directory tree and restart tomcat. The windows services version of tomcat is controlled by Procrun whic is not usable by Ant; forcing me to use a manual process. If you know how to stop the WinXP Services version of tomcat from a command prompt, I'd appreciate hearing about it. I realize that in the liong run the best thing to do is to find out what other program is holding a reference to log4j.properties, but that will be a difficult job, since other than tomcat and procrun no other java programs are running, as far as I can tell. Thanks and please reply if you have any additional advice. Lenny Wintfeld This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]