I’d like to retrieve a resource bundle string based on locale for a specific backing bean class.
In *.jsf files I’d just use #{text['my.string']}. How do I do this in my backing bean class?
ty
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ResourceBundle.getBundle("bundleName").getString("my.string")Pay attention: bundleName is the name of properties file without the extension “properties”. For example if you have file
messages.propertiesyou should callResourceBundle.getBundle("messages")