0

I have an application where the jsp file tries to read data from property file with the help of fmt tag like

<li id="username.${message.key}"><fmt:message                                       key="${message.key}">

The message key is set in a property file named xxx_en.properties and the property file is located at the location JavaSource/resources/xxx_en.propeties

In my spring context file, I have also mapped the property file as :

<bean id="messageSource"
        class="org.springframework.context.support.ResourceBundleMessageSource">
        <property name="basename" value="/WEB-INF/classes/resources/xxx_en" />

But the application is not able to read the property file xxx_en.properties at all. Instead of showing the vale from property in jsp, it's showing " ??key?? ", where key is the key=value pair in property file. Any idea how to resolve this?

Soham
  • 218
  • 2
  • 6
  • 15
  • Have you checked [this](https://stackoverflow.com/questions/4274765/reading-properties-file-from-jstl) answer? – amdg Feb 26 '18 at 09:29
  • @amdg : Thank u so much. I have gone through the link which you have provided and one of the solution worked. I have included the tag also with . Though it's quite strange that for some of the jsps, just the is working perfectly fine while for some of the jsps without tag it isn't working. Thanks anyway for the help. Really appreciate it. – Soham Feb 27 '18 at 03:55

0 Answers0