0

I want to get the name of the property file being loaded at the spring initialization (during tomcat container startup) in the JSP during runtime.

<util:properties id="propertyConfigurer" location="classpath:${devTarget_propertyFileClassPathHere}"/>
<context:property-placeholder properties-ref="propertyConfigurer" />

Where devTarget is being provided by Tomcat's catalina.properties file. And based on this value, a particular property file gets loaded during spring init.

Now I want to read this devTarget in JSP to render something based upon the environment, where devTarget tells the environment.

How should I do this? So that devTarget can be easily accessible in JSP.

Something like:

<spring:eval expression="@propertyConfigurer.getProperty('propertyNameHere')" />
Abhijeet Ahuja
  • 5,596
  • 5
  • 42
  • 50

1 Answers1

0

Done this by storing the values in context-param of web.xml and then used that in jsp using jstl.

Abhijeet Ahuja
  • 5,596
  • 5
  • 42
  • 50