currently using spring ‘exposedContextBeanNames’ to allow me to display properties in my view but havign issues with some properties that contain a “.”.
My xml is setup as
<bean id="properties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list><value>classpath:servers.properties</value> </list>
</property>
</bean>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/views/"/>
<property name="suffix" value=".jsp"/>
<property name="exposeContextBeansAsAttributes" value="true"/>
<property name="exposedContextBeanNames">
<list>
<value>properties</value>
</list>
</property>
</bean>
My “servers.properties” has a number of values
value1=this is the first value
value.value1=this is my second value
In my JSP
${properties.value1}
will display “this is the first value” as expected but
${properties.value.value1}
does not work. I’m hoping someone may be able to help me. Thanks
Try
${ properties['value.value1'] }.