In my application (Jdk 1.7, JSF2, Maven 3, Spring...), I tried the following configuration to set the UTF-8 encoding to my messages_xx_XX.properties i18n files:
i18n with UTF-8 encoded properties files in JSF 2.0 appliaction
I don't have problems running the app in Eclipse, but when I try to run in a standalone Tomcat 7 config (in order to deploy the application on Openshift platform), I have the following error:
java.util.MissingResourceException: Can't find bundle for base name fr.gf.predic.web.i18n.BundleUTF8Perso, locale fr_FR
Here is my application config:
the faces-config.xml
:
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
<managed-bean>
<managed-bean-name>currentDate</managed-bean-name>
<managed-bean-class>java.util.Date</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<application>
<locale-config>
<default-locale>fr-FR</default-locale>
<supported-locale>fr-FR</supported-locale>
</locale-config>
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
<resource-bundle>
<base-name>fr.gf.predic.web.i18n.BundleUTF8Perso</base-name>
<var>msg</var>
</resource-bundle>
</application>
the property file is in the folder: fr/gf/predic/i18n/textes
under the src/main/resources
folder.
In my pom.xml
, I have the following plugin filtering this folder:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<webResources>
<resource>
<directory>src/main/webapp/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.less</exclude>
</excludes>
</resource>
</webResources>
</configuration>
</plugin>
I don't see where the problem can come from.