protected void fillContextProperties(Context context){
  Enumeration enm=props.propertyNames();
  while (enm.hasMoreElements()) {
    String nm=(String)enm.nextElement();
    if (nm.startsWith("context.objects.")) {
      String contextObj=props.getProperty(nm);
      int colon=nm.lastIndexOf('.');
      String contextName=nm.substring(colon + 1);
      try {
        Class cls=Class.forName(contextObj);
        Object o=cls.newInstance();
        context.put(contextName,o);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
}

protected void fillContextProperties ( Context context ) { Enumeration enm = props . propertyNames ( ) ; while ( enm . hasMoreElements ( ) ) { String nm = ( String ) enm . nextElement ( ) ; if ( nm . startsWith ( "context.objects." ) ) { String contextObj = props . getProperty ( nm ) ; int colon = nm . lastIndexOf ( '.' ) ; String contextName = nm . substring ( colon + 1 ) ; try { Class cls = Class . forName ( contextObj ) ; Object o = cls . newInstance ( ) ; context . put ( contextName , o ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } } }
add objects to the context from the current properties .
