Deploying Tomcat from Eclipse

I truly do not understand all I know about this, but I’ve been tripped up by this several times now.
After working on a java servlet in Eclipse on a home machine (which happens to be Windows in this case), when I’m ready to deploy I export a WAR file and upload it to Tarragon, the Fedora box that serves this site. I copy the WAR file into /usr/share/tomcat6/webapps, and tomcat redeploys it. Then I have to fix the context.xml to change the datasources from the test database to the real database. Naturally I do this in /usr/share/tomcat6/webapps/<app>/META-INF/context.xml. Then I fire it up, and it fails.
This is when I remember that I have to also make this same repair somewhere else, and spend 15 minutes figuring out that the somewhere else is in /etc/tomcat6/Catalina/localhost/<app>.xml which is symlinked as /usr/share/tomcat6/conf/Catalina/localhost/<app>.xml.
I don’t completely understand this. I don’t have a good mental model of the mapping of java apps from an eclipse development, with a local tomcat instance that is used for debugging against a local (but not localhost) database, to a production environment where the database is on localhost. Eclipse has enumerable bells and whistles to try to make deployment as flexible as possible, which naturally means that for the novice it is overwhelming, and the nomenclature doesn’t seem consistent. No doubt in my flailing around to get it working in the two different tomcat environments, I’ve done something that requires the exported war file to create the datasource information in two places. Could well be something to do with my experimenting back and forth with whether the jdbc driver is local to the application or global to the environment. But maybe not.
Update: Spent a little time looking at this, though I can’t make it do what I want.
There is a setting on the HOST element in server.xml which controls whether or not to copy the META-INF/context.xml to conf//. Reading suggests it should be possible to put an appropriate FlightPlan2012.xml out there with the right stuff, and not have it overwritten. But I can’t make that work. When I deploy the conf///.xml is destroyed. I can have it copied/replaced from META_INF/context.xml if I want, but otherwise it is removed.
So now I know what to do. This wouldn’t be a problem if the database was on localhost on the test box. Unfortunately not.