J
Jani Tiainen
How do you refer to parameters/resources etc. defined in application
context file "context.xml" from Spring "applicationContext.xml" file?
I've only found how you can point to properties file or environment
parameters.
Let's say I've "META-INF/context.xml":
<Context path="/example" reloadable="false">
<Parameter name="exampleParam"
value="123456" override="false" />
</Context>
and in "WEB-INF/applicationContext.xml":
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="ExampleBean" class="com.example.ExampleBean">
<property name="exampleValue">
<value>
<!--
WHAT I ENTER HERE TO GET "exampleParam" VALUE
FROM CONTEXT.XML?!?
-->
</value>
</property>
</bean>
</beans>
so What I need to put in <value /> tag to get value from context.xml?
context file "context.xml" from Spring "applicationContext.xml" file?
I've only found how you can point to properties file or environment
parameters.
Let's say I've "META-INF/context.xml":
<Context path="/example" reloadable="false">
<Parameter name="exampleParam"
value="123456" override="false" />
</Context>
and in "WEB-INF/applicationContext.xml":
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="ExampleBean" class="com.example.ExampleBean">
<property name="exampleValue">
<value>
<!--
WHAT I ENTER HERE TO GET "exampleParam" VALUE
FROM CONTEXT.XML?!?
-->
</value>
</property>
</bean>
</beans>
so What I need to put in <value /> tag to get value from context.xml?