I have a web application deployed on tomcat 7. Its context file, named myAppName.xml is located in $CATALINA_HOME/conf/Catalina/localhost folder.
The problem I'm facing is that on each overwrite or undeploy, my configuration file is deleted from $CATALINA_HOME/conf/Catalina/localhost
folder and I have to copy/paste it from a backup location.
How can I prevent this behavior? I don't want to copy/paste context file everytime I change something in webapp.
Put it into web/META-INF in the source tree, then Tomcat will copy it out of there into conf/.... on each deploy. Tomcat 7 won't even do that by default, just use it where it is.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.