06 March 2008

Tomcat Deploys My Application Twice !

I drop my foo.war under webapps, and from the logs I see objects from my Spring application context getting loaded two times. What's causing this double deployment?

After much head-scratching I realised that my foo app was getting deployed as the root context (under "/"), as well as under "/foo". And in our Tomcat's server.xml we had a little

  <Context path=""

We dumped this Context entry, renamed foo.war to ROOT.war (caps necessary), and our double application startup disappeared.

Tomcat was dutifully doing its auto-deploy magic with its webapps directory, and then dutifully deploying any Contexts it found in its server.xml. If you really need a Context in your server.xml, make sure its docBase isn't under your Tomcat's webapps directory.

A simple solution, but it took us a while to fix, and according to my friend google lots of other people have had similar symptoms and worse trouble fixing them.

HTH :))


  1. I have a mission that I’m just now working on, and I have been at the look out for such information Roblox APK Robux Download

  2. Excellent effort to make this blog more wonderful and attractive. Iphone Download Latest version