1 Reply Latest reply on Jun 19, 2015 1:08 PM by Tim Gates

    Obtain contextRoot through Spring in applicationContext.xml

    Tim Gates Newbie

      Hello All,

      We have a need to somehow obtain the contextRoot name for a WAR deployment in the applicationContext.xml in order to specify the correct property file to use with a BridgePropertyPlaceholder bean.  We need something like below (although this doesn't work):

       

          <bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">

              <property name="locations">

                  <list>

                      <value>classpath:${contextRoot}.properties</value>

                  </list>

              </property>

          </bean>

       

      Does anyone know if the context root name is somehow accessible through Spring in the applicationContext?

       

      Cheers,

      Tim