import java.util.ResourceBundle;
...
// Next line loads myFile.properties from the application's WEB-INF/classes directory
ResourceBundle resourceBd = ResourceBundle.getBundle("myFile");
String foo = resourceBd.getString("foo");
That's it! All you need is myFile.properties with the following contents:
foo=bar
No comments:
Post a Comment