code: public static Object setAttribute(String name,
                                      Object value,
                                      ClassLoader loader)
    {
      for (; loader != null; loader = loader.getParent()) {
        if (loader instanceof EnvironmentClassLoader) {
          EnvironmentClassLoader envLoader = (EnvironmentClassLoader) loader;
  
          Object oldValue = envLoader.getAttribute(name);
  
          envLoader.setAttribute(name, value);
  
          return oldValue;
        }
      }
      
      /*
      if (_envSystemClassLoader != null) {
        Object oldValue = _envSystemClassLoader.getAttribute(name);
  
        _envSystemClassLoader.setAttribute(name, value);
  
        return oldValue;
      }
      */
  
      return null;
    }
docs: Sets a local variable for the current environment.
  
  @param name the attribute name
  @param value the new attribute value
  @param loader the context loader
  
  @return the old attribute value