String repositoryArgs = props.getProperty(name + ".repository." + i);
String repositoryArgs = conf.getProperty("repository." + i);
        AppDescriptor(String name) {            appName = name;            mountpoint = getMountpoint(props.getProperty(name + ".mountpoint",                                        appName));            pathPattern = getPathPattern(mountpoint);            staticDir = props.getProperty(name + ".static");            staticMountpoint = getPathPattern(props.getProperty(name + ".staticMountpoint",                                        joinMountpoint(mountpoint, "static")));            staticIndex = "true".equalsIgnoreCase(props.getProperty(name+                                                  ".staticIndex"));            String home = props.getProperty(name + ".staticHome");            if (home == null) {                staticHome = new String[] {"index.html", "index.htm"};            } else {                staticHome = StringUtils.split(home, ",");            }            protectedStaticDir = props.getProperty(name + ".protectedStatic");            cookieDomain = props.getProperty(name + ".cookieDomain");            sessionCookieName = props.getProperty(name + ".sessionCookieName");            protectedSessionCookie = props.getProperty(name + ".protectedSessionCookie");            uploadLimit = props.getProperty(name + ".uploadLimit");            uploadSoftfail = props.getProperty(name + ".uploadSoftfail");            debug = props.getProperty(name + ".debug");            encode = "true".equalsIgnoreCase(props.getProperty(name +                                        ".responseEncoding"));            String appDirName = props.getProperty(name + ".appdir");            appDir = (appDirName == null) ? null : new File(appDirName);            String dbDirName = props.getProperty(name + ".dbdir");            dbDir = (dbDirName == null) ? null : new File(dbDirName);            // got ignore dirs            ignoreDirs = props.getProperty(name + ".ignore");            // read and configure app repositories            ArrayList repositoryList = new ArrayList();            Class[] parameters = { String.class };            for (int i = 0; true; i++) {                String repositoryArgs = props.getProperty(name + ".repository." + i);                if (repositoryArgs != null) {                    // lookup repository implementation                    String repositoryImpl = props.getProperty(name + ".repository." + i +                                                              ".implementation");                    if (repositoryImpl == null) {                        // implementation not set manually, have to guess it                        if (repositoryArgs.endsWith(".zip")) {                            repositoryImpl = "helma.framework.repository.ZipRepository";                        } else {                            repositoryImpl = "helma.framework.repository.FileRepository";                        }                    }                    Repository newRepository = null;                    try {                        newRepository = (Repository) Class.forName(repositoryImpl)                                .getConstructor(parameters)                                .newInstance(new Object[] { repositoryArgs });                        repositoryList.add(newRepository);                    } catch (Exception ex) {                        System.out.println("Adding repository " + repositoryArgs + " failed. " +                                           "Will not use that repository. Check your initArgs!");                    }                } else {                    // we always scan repositories 0-9, beyond that only if defined                    if (i > 9) {                        break;                    }                }            }            if (appDir != null) {                FileRepository appRep = new FileRepository(appDir);                if (!repositoryList.contains(appRep)) {                    repositoryList.add(appRep);                }            } else if (repositoryList.isEmpty()) {                repositoryList.add(new FileRepository(                        new File(server.getAppsHome(), appName)));            }            repositories = new Repository[repositoryList.size()];            repositoryList.toArray(repositories);        }