Allow webapp context root to be overridden with property in standalone.xml
Description
Our config management roles currently use a template copy of jboss-web.xml, just so that they can add the XML element <context-root>$ROOT_CONTEXT</context-root>. This is a maintenance problem because every change in Zanata's jboss-web.xml has to be added to the template.
We should be able to use "descriptor-based property replacement" to fill in this value (not just the ROOT_CONTEXT, the whole element) from a variable instead (after adding a variable reference to jboss-web.xml in Zanata's source code).
It's important that users who don't specify a value for the new variable get the same behaviour as before: if deploying as zanata.war, the default context is /zanata. If deploying as ROOT.war, the default context is /. It's possible that an empty <context-root></context-root> would achieve this too, and it would be neater, but this would need to be confirmed.
Our config management roles currently use a template copy of jboss-web.xml, just so that they can add the XML element
<context-root>$ROOT_CONTEXT</context-root>
. This is a maintenance problem because every change in Zanata's jboss-web.xml has to be added to the template.We should be able to use "descriptor-based property replacement" to fill in this value (not just the ROOT_CONTEXT, the whole element) from a variable instead (after adding a variable reference to jboss-web.xml in Zanata's source code).
It's important that users who don't specify a value for the new variable get the same behaviour as before: if deploying as
zanata.war
, the default context is/zanata
. If deploying asROOT.war
, the default context is/
. It's possible that an empty<context-root></context-root>
would achieve this too, and it would be neater, but this would need to be confirmed.Refs:
https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html-single/Administration_and_Configuration_Guide/#Descriptor-based_Property_Replacement
https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/7.0/single/configuration-guide/#property_replacement
cc: