Wednesday, November 12, 2008

Fetching Property Files Using Resource Bundle

Put the property Files in the classpath ,which contains key value pairs.
If the files are putin any other location thean classpath , give the path in tomcat startup.sh or classpath.sh next to the bootstrap jar listing.
Now access the files as accessing any other Bundle
ResourceBundle myResources = ResourceBundle.getBundle("propertfilename");
Then u can do a bundle.getValue() to the required key value pair.

No comments:

 
Free Domain Names @ .co.nr!