I have a java webapp running under Tomcat 7 behind IIS 8 (both are configured for multihost).
To update the web application, I usually undeploy the existing one and deploy a new WAR (which gets exploded in its folder structure), but this causes the IIS web.config
file to be erased, thus loosing all the (IIS) website settings.
As far as I can tell (but I'm new to IIS), in IIS the website physical path is the webapp ROOT folder (i.e. /path/to/tomcat/webapp/ROOT
exploded from the WAR named ROOT.war
) and when I configure an error page in IIS, the file ROOT/web.config
is created.
Is there any way to avoid losing that configuration file? Or should I always redeploy the new war without undeploying the web application first?
If necessay, here are a couple of details:
- my web application has nothing to do with the
web.config
file, it is read and written by IIS only; - IIS and Tomcat are connected with the BonCode connector;
- the BonCode connector is installed for all sites;
- I'm running only one Tomcat instance;
- I'm changing IIS configuration to set custom error pages and SSL requirements.