previous | index | next

Message Bundles

Here is a Number Quiz application.

To manage the strings displayed on pages, they are stored in a properties file: messages.properties.

A properties file is typically stored in a Java source package, and must have the .properties extension.

You declare a message bundle in the faces-config.xml file using the resource-bundle element within an application element:

   <application>
      <resource-bundle>
         <base-name>com.corejsf.messages</base-name>
         <var>msgs</var>
      </resource-bundle>
   </application>

previous | index | next