on 04-25-2006 9:02 AM
Hi,
I've currently a WD application in which I retrieve data from a <i>properties-file</i> (for language issues) depending on the <b>Locale</b>.
For the moment I read the file with <b>FileReader & BufferedReader</b> (works fine), but I want to use <b>ResourceBundle</b> because I can easily read the file with a key.
But the problem is, that I cannot read the <i>properties-file</i> or better said, I don't know where to place the file.
The error message I get is:
<i>Can't find bundle for base name rb_file, locale en_US</i>
Anyone encountered this issue?
Greetz,
Bart
Hi Bart,
U can place the property file in the gen_wdp>packages><Your Package Name>.
Right click the package name and paste the file in this structure.
For accessing this resoutrce bundle inside ur component.
<b>ResourceBundle bundle = ResourceBundle.getBundle("<path of the resource bundle.(Package name.Res bundle name)>");
String name = bundle.getString("<value inside the res bundle>");</b>
Hope it helps,
Regards,
Nagarajan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wauw, thx for the very quick response!
I've solved the problem and you both give me a part of the solution.
I had to import the file like <i>Bala Krishnan</i> said.
Then I had to addapt the code like <i>Nagarajan Kumarappan</i> explained.
Thx again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.