I do not get how to create a new own properties file
Create a text file according to the java.util.Properties contract. ISO-8859-1 encoded text with key=value pairs, each in its own line. In the case of a JSF message resource, you can use key names as described in the JSF specification to override the default messages. You can find them in chapter 2.5.2.4 of the JSF specification (here the JSF 1.2 specification and the JSF 2.0 specification ).
and where to put this file under the directory
Just put it in the classpath, as with regular Java classes.
The <message-bundle> file in faces-config.xml must reference the fully qualified name of the resource resource. If you named the properties file Messages.properties and simply dropped it into the root directory of the path, then its declaration should look like
<application> <message-bundle>Messages</message-bundle> </application>
But if you drop it, for example, into the com.example.i18n package, it should look like this:
<application> <message-bundle>com.example.i18n.Messages</message-bundle> </application>
Balusc
source share