applicationContext-Service.xml
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames">
<list><value>messages</value></list>
</property>
</bean>
I have messages_en_US.properties under /src/messages_en_US.properties
registerForm.passwordNotMatch=Password does not match.
This is line of code is bringing up the error:
binding.addError(new FieldError(REGISTER_FORM, "passwordNotMatch", messageSource.getMessage("registerForm.passwordNotMatch", null, locale)));
Error: No message found under code ‘registerForm.passwordNotMatch’ for locale ‘en_US’.
What might be wrong?
does it work if you change to:
?
I had the experience that if using
ReloadableResourceBundleMessageSource, in jsp will not find the properties file. addingclasspath:before thebasenamesolved my problem.Well even though was my project managed by maven, I think you can give it a try anyway.