PDA

View Full Version : ReloadableResourceBundleMessageSource - Missing something?


kwalton
Oct 5th, 2005, 02:58 PM
I've successfully used the ResourceBundleMessageSource but I am consistently having trouble getting ReloadableResourceBundleMessageSource to work (I should mention that by not working I mean that it doesn't resolve the message, i get ???userForm.fullName???). Below is my setup - of course it looks ok to me.

my-servlet.xml

... snip
<bean id="messageSource" class="org.springframework.context.support.ReloadableReso urceBundleMessageSource">
<property name="basenames">
<list>
<value>/WEB-INF/labels/sampleA</value>
<value>/WEB-INF/labels/sampleB</value>
</list>
</property>
<property name="cacheSeconds"><value>1</value></property>
</bean>
... snip


/WEB-INF/labels/sampleA_en_US.properties

userDetails.fullName = Full Name
userForm.fullName = Full Name


my-user.jsp
... snip
<fmt:message key="userForm.fullName" bundle="sampleA"/>
... snip


Like I said - if I remove the cacheSeconds property and remove the "Reloadable" from ReloadableResourceBundleMessageSource everything works great.

I should mention I'm running Resin 3.0.14 as my container.


Am I missing something critical here? Thanks in advance for the assistance!

Regards,
Kaleb

zaztz
Dec 15th, 2005, 10:20 PM
I had the same problem even without specifying "cacheSeconds" and am using tomcat. Even tried specifying the full-path! Anyone managed to get this to work?