protected void configure() throws Exception {
        Ini ini = loadIniFromConfig();

        if (CollectionUtils.isEmpty(ini)) {
            LOGGER.info("Null or empty configuration specified via 'config' init-param.  "
                    + "Checking path-based configuration.");
            ini = loadIniFromPath();
        }
        //added for SHIRO-178:
        if (CollectionUtils.isEmpty(ini)) {
            LOGGER.info("Null or empty configuration specified via '" + CONFIG_INI_PARAM_NAME + "' or '"
                    + CONFIG_PATH_INI_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)) {
            LOGGER.info("Null or empty configuration specified via '" + CONFIG_INI_PARAM_NAME + "' or '"
                    + CONFIG_PATH_INI_PARAM_NAME + "' filter parameters.  Trying the default "
                    + IniFactorySupport.DEFAULT_INI_RESOURCE_PATH + " file.");
            ini = IniFactorySupport.loadDefaultClassPathIni();
        }

        Map<String, ?> objects = applySecurityManager(ini);
        applyFilterChainResolver(ini, objects);
    }
Sets the config path to be used to load a .ini file for configuration if a configuration is
not specified via the {@link #getConfig() config} attribute.
<p/>
This value is {@code null} by default, but it will be automatically set to the value of the
'{@code configPath}' {@code init-param} if it exists in the {@code FilterConfig} provided by the servlet
container at startup.

@param configPath the config path to be used to load a .ini file for configuration if a configuration is
                  not specified via the {@link #getConfig() config} attribute.
web/src/main/java/org/apache/shiro/web/servlet/IniShiroFilter.java