code: protected Iterator<IServletConfig> sortNamesByStartUpWeight(Iterator<IServletConfig> iterator) {
  
          // System.out.println("in sort");
          int min = Integer.MAX_VALUE;
          int maxpos = 0;
  
          sortedServletConfigs = new ArrayList<IServletConfig>();
          while (iterator.hasNext()) {
              IServletConfig sc = iterator.next();
              addToStartWeightList(sc);
          }
  
          return sortedServletConfigs.iterator();
  
      }
docs: Method sortByStartUpWeight. Sorts the servlets in the order of their
  startUp weight. This way, we can iterate the list, and call their
  respective init() methods if loadAtStartUp() is true, without worrying
  about the order.
  
  @param iterator
  @return Iterator