Reputation: 681
I tried to add properties files to my xhtml page in JSF by using f:loadBundle
tag.
I tried do it many times in different ways but nothing works
(prop_files/logowanie
, prop_files.logowanie
).
I kept property files in WebContent/prop_files folder and xhtml files are in WebContent.
Please help me how to add properties to page. Maybe I keep this files in wrong folder?
Upvotes: 1
Views: 1454
Reputation: 8574
The basename of a f:loadBundle tag should be like a class name as the properties files is loaded by the class loader like this:
<f:loadBundle basename="com.examples.messages" var="msgs"/>
The file extension should be .properties.
So place the file in your classpath for example in your src/java/com/examples/messages.properties
Upvotes: 1