plistwebobjects

How to load .plist files in java Webobjects code


I want to load the .plist files and store in com.webobjects.foundation.NSDictionary variable.

The piece of code which was earlier

 private NSDictionary variable;

 try{
   variable = OWWOFileUtilities.loadConfigFile("xxxxx.plist", null);
 }

  variable.objectforkey("string");

Now the OWWOFileUtilities is not used anymore, So I want the alternate way to load the .plist into my project


Solution

  • See,

    com.webobjects.foundation.NSPropertyListSerialization.dictionaryForString(String value) 
    

    Apache configuration classes also support loading plists.