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">
Does anyone know if the context root name is somehow accessible through Spring in the applicationContext?
I found the magic I was looking for by using SPeL and accessing the ServletContext to get the contextPath (not contextRoot) like so: