To reference error messages or static data from the page, you first need to make available the resource bundle containing the data.
To make available resource bundles that contain static data, you need to do one of two things:
Register the resource bundle with the application in the configuration file using the resource-bundle element, as explained in Registering Custom Localized Static Text.
Load the resource bundle into the current view using the loadBundle tag.
Here is an example loadBundle tag from bookstore.jsp:
<f:loadBundle var="bundle" basename="messages.BookstoreMessages" />
In the case of resource bundles that contain error messages, you need to register the resource bundle with the application in the configuration file using the message-bundle element, as explained in Registering Custom Error Messages. One exception is if you are referencing the error messages from the input component attributes described in Referencing Error Messages. In that case, you load the resource bundles containing these messages in the same way you load resource bundles containing static text.