Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat Hot Deploy not working

I'm having an issue hot deploying a new WAR on my Tomcat 6 server.

When I add in my new WAR I can see that Tomcat is attempting to deploy it. However, I believe the problem lies in undeploying the old war - the exploded war folder's contents are all deleted - except the WEB-INF folder.

If I stop the server, delete the WEB-INF folder and then start again, my war is deployed correctly.

Can anyone suggest anything which may be happening here?

Thanks.

like image 326
Gerard Avatar asked Sep 23 '09 11:09

Gerard


People also ask

Does Tomcat support hot deployment?

However, Tomcat also supports a variety of hot deployment options, allowing users to roll out new applications, or even update existing ones, while the server is still running.

How does Tomcat deployment work?

Perhaps the simplest way to deploy a WAR file to Tomcat is to copy the file to Tomcat's webapps directory. Copy and paste WAR files into Tomcat's webapps directory to deploy them. Tomcat monitors this webapps directory for changes, and if it finds a new file there, it will attempt to deploy it.


1 Answers

Found the solution, the problem lies in the fact that Windows locks the folder when Tomcat is running. To remove this locking, just edit context.xml in the Catalina Home, change

<context>

to:

<Context antiJARLocking="true" antiResourceLocking="true">
like image 163
Gerard Avatar answered Sep 30 '22 17:09

Gerard