aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Resource bundle in Prime faces" Watch "Resource bundle in Prime faces" New topic
Author

Resource bundle in Prime faces

Mary Cole
Ranch Hand

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


Al accessing the value in an output text



resource.properties 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 resource.properties 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:

Regards
Cesar


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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Resource bundle in Prime faces
 
Similar Threads
Weird JSF "h:messages" tag behavior
Where to put resource bundles?
message-bundle not working
how to customize error messages
JSF message in faces-config.xml itself