Reputation: 1548
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.
Upvotes: 13
Views: 3891
Reputation: 310893
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.
Upvotes: 1