LOG .info("REPOSITORY_DEV_MODE detected and enabled for servlet '" + getServletName() + "'."); } }  String acceptedLocaleNames = getParameter(FILTERED_LOCALES_PARAMETER); if (acceptedLocaleNames != null) { localeSupport = true;  filteredLocales = new HashSet();  for (StringTokenizer st = new StringTokenizer(acceptedLocaleNames, ","); st.hasMoreTokens();) { String localeName = st.nextToken();  Locale locale = convertLocaleName(localeName, false); if (locale == null) { continue; }  filteredLocales.add(locale); } }  String localeName = getParameter(REPOSITORY_DEFAULT_LOCALE); if (localeName != null) { defaultLocale = convertLocaleName(localeName, true); localeSupport = true;  if (defaultLocale != null) { LOG .info("REPOSITORY_DEFAULT_LOCALE specify default locale to '" + defaultLocale + "'."); } else { LOG.info("REPOSITORY_DEFAULT_LOCALE value '" + localeName + "' is not accepted ! (invalid or not accepted !)");
LOG.info("Enable REPOSITORY_DEV_MODE for servlet '" + getServletName() + "'.");
    public void init(ServletConfig config) throws ServletException {        super.init(config);        String nc = getParameter(NO_CACHE_PARAMETER);        if ("true".equalsIgnoreCase(nc)) {            noCache = true;            LOG.info("NO_CACHE detected and enabled for servlet '"                    + getServletName() + "'.");        }        String repositoryDevModePropertyName = getRepositoryDevModeParameterName();        if (repositoryDevModePropertyName != null) {            String dev = getParameter(repositoryDevModePropertyName);            if ("true".equalsIgnoreCase(dev)) {                devMode = true;                LOG                        .info("REPOSITORY_DEV_MODE detected and enabled for servlet '"                                + getServletName() + "'.");            }        }        String acceptedLocaleNames = getParameter(FILTERED_LOCALES_PARAMETER);        if (acceptedLocaleNames != null) {            localeSupport = true;            filteredLocales = new HashSet();            for (StringTokenizer st = new StringTokenizer(acceptedLocaleNames,                    ","); st.hasMoreTokens();) {                String localeName = st.nextToken();                Locale locale = convertLocaleName(localeName, false);                if (locale == null) {                    continue;                }                filteredLocales.add(locale);            }        }        String localeName = getParameter(REPOSITORY_DEFAULT_LOCALE);        if (localeName != null) {            defaultLocale = convertLocaleName(localeName, true);            localeSupport = true;            if (defaultLocale != null) {                LOG                        .info("REPOSITORY_DEFAULT_LOCALE specify default locale to '"                                + defaultLocale + "'.");            } else {                LOG.info("REPOSITORY_DEFAULT_LOCALE value '" + localeName                        + "' is not accepted ! (invalid or not accepted !)");            }        }        try {            repository = initializeRepository(config);        } catch (IOException e) {            throw new ServletException(                    "Can not initialize repository for servlet '"                            + getServletName() + "'.", e);        }        String groupAll = config.getInitParameter(getParameterPrefix()                + MODULES_PREFIX + ".GROUP_ALL");        if (groupAll != null) {            LOG.debug("Group all modules: " + groupAll);            for (StringTokenizer st = new StringTokenizer(groupAll, ";, "); st                    .hasMoreTokens();) {                String name = st.nextToken();                if ("all".equalsIgnoreCase(name)) {                    IRepository.IModule modules[] = repository.listModules();                    for (int i = 0; i < modules.length; i++) {                        modules[i].setGroupAllFiles(true);                    }                    continue;                }                IRepository.IModule module = repository.getModuleByName(name);                if (module == null) {                    throw new IllegalArgumentException("Can not find module '"                            + name + "' to enable 'groupAll'.");                }                module.setGroupAllFiles(true);            }        }        String bootSet = config.getInitParameter(getParameterPrefix()                + ".BOOT_SET");        if (bootSet != null) {            StringTokenizer st = new StringTokenizer(bootSet, ",; \n\t\r");            if (st.countTokens() != 1) {                throw new ServletException(                        "Only one SET can be specified as BOOT_SET !");            }            bootSet = st.nextToken();            String parameterValue = config                    .getInitParameter(getParameterPrefix() + SET_PREFIX + "."                            + bootSet);            if (parameterValue == null) {                throw new ServletException(                        "Set specified by BOOT_SET is not defined !");            }            IRepository.ISet set = initializeModuleSet(bootSet, parameterValue);            if (set == null) {                throw new IllegalArgumentException("Can not find boot set '"                        + bootSet + "'.");            }            repository.setBootSet(set);        }        Enumeration parameterNames = config.getInitParameterNames();        String setPrefix = getParameterPrefix() + SET_PREFIX;        for (; parameterNames.hasMoreElements();) {            String parameterName = (String) parameterNames.nextElement();            if (parameterName.startsWith(setPrefix) == false) {                continue;            }            String parameterValue = config.getInitParameter(parameterName);            parameterName = parameterName.substring(setPrefix.length() + 1);            if (parameterName.length() < 1) {                continue;            }            if (parameterName.equals(bootSet)) {                continue;            }            LOG.debug("Group modules '" + parameterValue + "' to set : "                    + parameterName);            initializeModuleSet(parameterName, parameterValue);        }    }