We are using wildfly 8 and 9 in standalone mode to deploy our applications. In front of the wildfly there is a shared apache reverse proxy. The proxy maps /test/ to one wildfly and /test2/ to another system. Our application is using JSF which makes it necessary for it to "know" the context path. Therefore we have to create different deployment artifacts for the different wildfly instances now, because the application.xml has to define the context-root either as /test/ or /test2/
I was wondering now if it is possible to override the context-root from the appplication.xml in the wildfly configuration. E.g. our context-rot in the application.xml could be / for all environments while wildfly prepends it with either /test/ or /test2/ depending on the instance. Is this possible somehow?