пт, 19 июл. 2019 г. в 12:47, Victor WILLART <victor.will...@hei.yncrea.fr>: > > Hi everybody, > > > I am using Tomcat 8.0, and I am struggling to replace and deploy a WAR file. >
Tomcat 8.0 has reached End of Life and should not be used anymore. The replacements are Tomcat 8.5 and 9.0. > > I made a new WAR file, named it like the old one, and replaced it in my > webapps folder. But the new generated folder for my application is just > containing a single folder "config" which is empty. All the other folders and > files are missing … I tried also to deploy it through the Tomcat Manager and > it happened the same. > > > I don't think my war file is wrong since I have a back up folder of my app > that was working perfectly before trying this, and the back up WAR file isn't > working neither. Only replacing the deployed folder by the deployed folder > from back up makes my app work again correctly. > > > If you have any hints or guesses about this, I would gladly try them. > 1. A WAR file is effectively a ZIP archive (with minor differences like using UTF-8 to encode file names). The first thing Tomcat does when you deploy the web application is to unpack the file. You can perform this step manually using the "jar"utility from JDK. If you unpack the file manually, you would better remove the war file from the webapps directory (or at least rename its extension), so that auto-deployment does not interfere. It may be that your war file is broken, or does not contain anything besides the "config" directory. The "t" command of the jar utility can be used to test the war file and to list its contents (as suggested by Christopher). 2. When you undeploy a web application, make sure that all its files (in webapps and in work directory) are removed. The "config" directory may remain from an incomplete undeployment. E.g. if the files in the config directory are owned by root user and cannot be deleted by the user running Apache Tomcat. 3. I hope that you do not run two copies of Tomcat over the same webapps directory at the same time. 4. Read the logs. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org