JG1991
JG1991

Reputation: 143

tomcat undeploys application after deleting war file

I am having two web applications one running on tomcat7.0.57 and one on tomcat6.0.3 on amazon EC2 server.My application gets undeployed when following is the case:
-upload .war file
-restart tomcat
-delete war file
Initially on WHM server war file was no more needed after tomcat restart.Please help.

Upvotes: 4

Views: 8222

Answers (1)

Ivan Gammel
Ivan Gammel

Reputation: 662

This is correct and expected behavior of Tomcat: WAR file is primary source of application code and if it gets changed or removed, this is treated as request to redeploy or undeploy the application.

If you stop tomcat before deleting WAR file and start it only after that, the application will not be undeployed.

Ideally you should not have the need to delete the WAR file: if you change content of the unpacked web application and don't want it to be redeployed from WAR on next Tomcat restart, probably, it's better to separate dynamic content and move it to some other folder or database.

Upvotes: 10

Related Questions