This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons 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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resource bundle in Prime faces
 
Similar Threads
message-bundle not working
JSF message in faces-config.xml itself
Weird JSF "h:messages" tag behavior
Where to put resource bundles?
how to customize error messages