Meaningless Drivel is fun!
The moose likes JSF and the fly likes Resource bundle in Prime faces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Resource bundle in Prime faces" Watch "Resource bundle in Prime faces" New topic

Resource bundle in Prime faces

Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
I have the file under WEB-INF/classes folder and the faces-config.xml looks like this

Al accessing the value in an output text entry is

But when I access the xhtml, the value is blank. Am I missing anything here?

Thanks in advance

Cesar Loachamin
Ranch Hand

Joined: Dec 25, 2010
Posts: 90

Hi Mary.

You're a little confused as you say you want to use a resource bundle so you must use a <resource-bundle>, so if you have a properties file named you must put it in a package for example com.testpackage, and you can configure the resource bundle in the faces-config so,

And by doing this, you can use the resource (resource is the name that you give to resource-bundle using the <var> tag) as you want:


When a dream is ending because to come true - OCPJP 6,7. OCE JPA EE6. MCTS
Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
Thanks , it worked
Consider Paul's rocket mass heater.
subject: Resource bundle in Prime faces
It's not a secret anymore!