Click to See Complete Forum and Search --> : Tomcat weird's undeploy task


code_monkey
11-21-2005, 05:53 AM
Hi,
I've created two ant tasks, one that deploys an JSF webApp to tomcat. It works fine. The other task is to undeploy the JSF web App, however when I ran the undeploy task, the webApp is not completly undeployed and I can't redeploy again the webb app because it gives me the following error:

FAIL - Application already exists at path /firstSample



If I check the directory <TOMCAT_HOME>/webapps/firstSample/WEB-INF/libs two jars stills there, the sandbox.jar and tomahawk.jar and I can't remove them until I shut down tomcat.

Can someone help me on this?
Thanks
CM

Carla Schroder
11-23-2005, 02:49 PM
OK, I have no idea, and apparently no one else does either. Come on folks, don't be shy!

code_monkey
11-24-2005, 02:54 AM
Hi,
Meanwhile I found a solution somewhere else.
The solution I've found is to add a context.xml to my WEB-INF folder, or change the one existing in the conf folder, and do the following;

<Context path="/myapp" docBase="myapp" debug="0"
reloadable="true" antiJARLocking="true" antiResourceLocking="true"/>

This way, tomcat will not use the jars in the webb app directly, instead it makes a copy to a teporary directory and use that temp jars.

This works for me.

Carla Schroder
11-25-2005, 10:28 AM
Excellent, thanks for posting the solution.