I am running a java web application on Java 6 and Spring 3.0.

I have properties file used by the web application and is loaded by the spring framework on server start.

config.properties

url=http://www.url.com
test.url=http://www.test.com
dev.url=http://www.dev.com

I have requirement to use the properties values in java and jsp code. I am able to access the value in java using annotations provided in spring 3.0 : @Value("${test.url}")

To use the properties in JSP, I am trying to load the properties into servlet context, so that the properties can be referenced in the JSP directly

servletContext.setAttribute("props", properties);

In my jsp, when i print ${props}, it results the following ...

{url=http://www.url.com,test.url=http://www.test.com,dev.url=http://www.dev.com}

But when i print ${props.test.url}, it prints nothing (the same works for ${props.url}).

Is this an issue or am i doing something wrong. How can i get the ${props.test.url} work in jsp