Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42747
I've tested this with all the combinations I could think of and ensured that the order of the redploy resources is consistent. The summary of changes is:
- context.xml takes effect on first deploy rather than next restart
- context.xml from DIR is now copied to conf/<eng>/<host> in the same manner as context.xml from WAR
I also fixed a couple of edge cases I spotted and changed a few local variables to make the code easier to understand.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@712464
13f79535-47bb-0310-9956-
ffa450edef68