• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Resource bundle in Prime faces

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Ranch Hand
Posts: 90
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks , it worked
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic