Reputation: 29
For Example i have a war file named test.war First time when i deploy test.war tomcat extracts it and created folder test , but when change something with the app and create war to deploy again tomcat does not unpack war file second time.So i must delete test folder then tomcat unpacks the war file without problem.But i don't want to delete test folder because there will be users images data or something else.
Upvotes: 2
Views: 2277
Reputation: 455
I think that is supposed to be that way. When the war file is extracted, its contents will be put into a namesake folder. The existence of a namesake folder tells that the war file has already been unpacked, or else it would keep unpacking the same war every time it finds it. You explicitly tell it to unpack the war file, if it has already been unpacked, by removing/renaming the target folder (it's good idea to keep a backup in case you need to roll-back).
It is a bad practice to put dynamic data or users stuff into that folder. You should store those things somewhere else.
Upvotes: 1