tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anurag Kapur <>
Subject Tomcat 7 | Tracking the completion of the WAR file deployment
Date Mon, 29 Oct 2012 11:35:20 GMT

I have a few WAR files provided by a supplier where there are environment
specific configurations in files that cannot be moved outside the web
application (It is possible, but since I do not have the source code, I
cannot do it and this looking for options while the suppliers does this at
their own pace)



For our build and release process, I would have liked to build a single
environment agnostic .war file for MyWebapp and deploy configurations like
config.xml to a folder outside the web app but in the classpath. But due to
the reasons mentioned above this isn't possible for now. So my options:

1. Build environment specific .war files example:
MyWebapp-Dev.war, MyWebapp-TEST.war, MyWebapp-PROD.war
This works, but I am looking for better options

2. Have a mechanism by which I have a way of getting notified by Tomcat
when the .war is deployed so that I can then copy the environment specific
files into the exploded WAR. I know I can wait for say 30 secs after
dropping the .war file to the Tomcat_HOME/webapps directory for it to be
exploded and then copy my configs. However, this method can be error prone
on frequent deployments as Tomcat might take longer than the wait time I
configured (No, I cannot set a very large and hence always safe wait time).
Is there a better way of doing this?

Anurag Kapur

Twitter: @anuragkapur <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message