protected void configure() throws Exception { Ini ini = loadIniFromConfig(); if (CollectionUtils.isEmpty(ini)) { log.info("Null or empty configuration specified via 'config' init-param. " + "Checking path-based configuration."); ini = loadIniFromPath(); } //added for SHIRO-178: if (CollectionUtils.isEmpty(ini)) { log.info("Null or empty configuration specified via '" + CONFIG_INIT_PARAM_NAME + "' or '" + CONFIG_PATH_INIT_PARAM_NAME + "' filter parameters. Trying the default " + DEFAULT_WEB_INI_RESOURCE_PATH + " file."); ini = getServletContextIniResource(DEFAULT_WEB_INI_RESOURCE_PATH); } //although the preferred default is /WEB-INF/shiro.ini per SHIRO-178, keep this //for backwards compatibility: if (CollectionUtils.isEmpty(ini)) { log.info("Null or empty configuration specified via '" + CONFIG_INIT_PARAM_NAME + "' or '" + CONFIG_PATH_INIT_PARAM_NAME + "' filter parameters. Trying the default " + IniFactorySupport.DEFAULT_INI_RESOURCE_PATH + " file."); ini = IniFactorySupport.loadDefaultClassPathIni(); } Map<String, ?> objects = applySecurityManager(ini); applyFilterChainResolver(ini, objects); }
ini = getServletContextIniResource(path); if (ini == null) { String msg = "There is no servlet context resource corresponding to configPath '" + path + "' If " +