If the configurations differ due to the needs of your application, I would say that editing server.xml is the wrong way to do this.
The best solution is to have context.xml for your application in META-INF. Keep things specific to your server isolated application. You will not affect other applications in this way, and you cannot always count on the possibility of changing the server configuration if you are in a shared environment.
source
share