Announcement Announcement Module
No announcement yet.
strange resourceBundle issue Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • strange resourceBundle issue


    I have my internationalization working correctly locally (Windows 7), that is, externalContext.locale and resourceBundle return the correct values according to the selected locale. I can change the locale by adding ?locale=<locale> to the URL, so all is fine.

    However, now I've installed the app on a preproduction server (Centos linux), externalContext.locale still shows the correct locale (even when I change it), but the resourceBundle always returns the english text.
    My message files are organized as (Spanish messages) and (English messages).

    web-application-config.xml contains the following:
    	<bean id="messageSource"
    		<property name="basenames">
    		<property name="useCodeAsDefaultMessage" value="true"/>
    	<bean id="localeChangeInterceptor"
    		<property name="paramName" value="locale" />
    	<!-- Declare the Resolver -->
    	<bean id="localeResolver"
    		class="org.springframework.web.servlet.i18n.SessionLocaleResolver" />
    So it seems the interceptor is working correctly on linux, externalContext is updated correctly, but resourceBundle doesn't pick up the locale; it chooses the file instead of the default one.
    My local machine has Spanish language installed, the server is English based, although in theory that shouldn't influence..

    Any ideas?

    Regards, Bo

  • #2
    when I take out <property name="useCodeAsDefaultMessage" value="true"/>

    I get the following error message in the log: urceBundleMessageSource - No properties file found for [messages] - neither plain properties nor XML

    However, in WEB-INF/classes the files and are present.

    I have it installed on tomcat 7.

    Anybody has any idea?