PDA

View Full Version : congfiguring the resource bundle properties file


rinamagro
Jun 6th, 2008, 06:31 AM
Hi all
I am trying to configure the Resource Bundle properties file in Spring MVC with no succcess.
I am using Tomcat on Eclipse IDE. In my xml file i tried this:
<bean id="messageSource" class="org.springframework.context.support.ResourceBundle MessageSource">
<property name="basename"><value>messages</value></property>
</bean>
and tried creating a messages.properties file under my build/classes , under WEB-INF and under various places but when i try to load a message through
<fmt:message key="greeting"/>
im always getting this ???greeting??? (not finding the message)
Any suggestions please cos I am quite new to Spring MVC
thanks lots
Rina

Marten Deinum
Jun 6th, 2008, 08:03 AM
1) Make sure you use a ViewResolver and that it supplies the integration
2) Don't access jsp's directy make sure you pass through the DispatcherServlet

rinamagro
Jun 6th, 2008, 08:20 AM
ok thanks will give it a try. i was accessing jsps directly before as i am still in configuration and early stages