To make the resource bundle available to the application, you need to configure it in the configuration file, by performing the following task.
The faces-config.xml deployment descriptor contains configuration settings for the JavaServer Faces application. JSF applications don't require a deployment descriptor unless they use features that can only be configured in faces-config.xml. In firstcup, the deployment descriptor has settings defining the resource bundle that provides localized strings in English and Spanish.
Select firstcup in the Projects Pane and select File -> New File.
In the New File dialog, select JavaServer Faces under Categories, new JavaServer Face Configuration under File Types, click Next, then Finish.
The firstcup application is localized for English and Spanish languages. JavaServer Faces applications can automatically select the proper language based on the locale of the user's web browser. Specify the default and supported locales in the faces-config.xml file.
With the newly created faces-config.xml file open, click XML.
Add the following <application> tag to configure the resource bundle:
<application> <resource-bundle> <base-name>firstcup.web.WebMessages</base-name> <var>bundle</var> </resource-bundle> <locale-config> <default-locale>en</default-locale> <supported-locale>es</supported-locale> </locale-config> </application>
The base-name element of the resource-bundle element identifies the fully-qualified class name of the resource bundle. The var element identifies the name by which the XHTML pages will reference the resource bundle. The locale-config element identifies the locales supported by the resource bundle.
Right-click in the editor window and select Format.
Select File -> Save.