propNewServlets[i] = addProperty("Classname of servlet " + (i+1), DFLT_SERVLET_CLASS);
propNewServlets[i] = addProperty("_Classname of servlet " + (i+1), DFLT_SERVLET_CLASS);
  private void updateNewServletCount(Integer newCount) {    int count = newCount.intValue();    // For now delete all variable props and start fresh.    // Annoying for the user, but it works.    if( propNewServlets != null && count != propNewServlets.length ) {      for(int i=0; i < propNewServlets.length; i++) {        removeProperty(propNewServlets[i]); // class	// Now the arguments	int numargs = 0;	if (propNewServletNumArgs[i] != null) {	  Integer na = (Integer)propNewServletNumArgs[i].getValue();	  numargs = na.intValue();	}	for (int j = 0; j < numargs; j++) {	  removeProperty(propNewServletArgs[i][j]);	}	// Now the number of arguments        removeProperty(propNewServletNumArgs[i]);      }    }    propNewServlets = new Property[count];    propNewServletNumArgs = new Property[count];    propNewServletArgs = new Property[count][0];    for(int i=0; i < count; i++) {      propNewServlets[i] = addProperty("Classname of servlet " + (i+1), DFLT_SERVLET_CLASS);      ((Property) propNewServlets[i]).setToolTip("Full classname of the new servlet (loader) #" + (i+1));      propNewServletNumArgs[i] = addProperty("Number of args for servlet " + (i+1), PROP_NEW_SERVLETS_ARG_COUNT_DFLT);      ((Property)propNewServletNumArgs[i]).setToolTip("Number of arguments for servlet " + (i+1));      ((Property)propNewServletNumArgs[i]).addPropertyListener(new ConfigurableComponentPropertyAdapter() {	  public void propertyValueChanged(PropertyEvent e) {	    String name = e.getProperty().getName().toString();	    String servnum = name.substring(name.indexOf("servlet") + 8);	    int snum = -1;	    try {	      snum = Integer.parseInt(servnum) - 1;	    } catch (NumberFormatException nfe) {}	    if (snum != -1) {	      updateNewServletArgCount(snum, (Integer)e.getProperty().getValue());	    } else {	      if (log.isErrorEnabled()) {		log.error("Couldn't figure out servlet being edited. name was " + name + ", servnum was " + servnum);	      }	    }	  }	});      updateNewServletArgCount(i, PROP_NEW_SERVLETS_ARG_COUNT_DFLT);    }  }