If it is defined as message-bundle application in faces-config.xml as follows
<application> <message-bundle>messages</message-bundle> </application>
then you can get its name Application#getMessageBundle()
String messageBundleName = facesContext.getApplication().getMessageBundle();
This way you can get a ResourceBundle instance as follows:
ResourceBundle messageBundle = ResourceBundle.getBundle(messageBundleName);
Finally, you can get the message property by key as follows:
String value = messageBundle.getString("property.key");
source share