This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resource Bundle 3 values property file

 
Ramesh Sunkara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Guys,

This is the format of my properties file



I have to use these values in my JSP page.
Previously, I used BufferedReader to read each line and then use "split" method specifying '=' as delimeter.


But now, I have been asked to use ResourceBundle to read properties file.

When I googled for it , I found that using ResourceBundle we can use key/value pair scenario only. Here I have 3 values. How can I use ResourceBundle in this case.

Please give me the code also.

Thank You.
 
marten kay
Ranch Hand
Posts: 187
Java jQuery Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
properties are usually stored in key value pairs. It's difficult to see what is the key or property and what is its value in your initial scenario. Also, the resource bundle (as I understand) is used for localization where you have a key and a locale value, so I'm not to sure what the intent is here of either of your scenarios.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic