protected Ini convertPathToIni(String path) {

        Ini ini = new Ini();

        //SHIRO-178: Check for servlet context resource and not
        //only resource paths:
        if (!ResourceUtils.hasResourcePrefix(path)) {
            ini = getServletContextIniResource(path);
            if (ini == null) {
                String msg = "There is no servlet context resource corresponding to configPath '" + path + "'  If "
                        + "the resource is located elsewhere (not immediately resolvable in the servlet context), "
                        + "specify an appropriate classpath:, url:, or file: resource prefix accordingly.";
                throw new ConfigurationException(msg);
            }
        } else {
            //normal resource path - load as usual:
            ini.loadFromPath(path);
        }

        return ini;
    }
Converts the specified file path to an {@link Ini} instance.
<p/>
If the path does not have a resource prefix as defined by {@link ResourceUtils#hasResourcePrefix(String)}, the
path is expected to be resolvable by the {@code ServletContext} via
{@link javax.servlet.ServletContext#getResourceAsStream(String)}.

@param path the path of the INI resource to load into an INI instance.
@return an INI instance populated based on the given INI resource path.
web/src/main/java/org/apache/shiro/web/servlet/IniShiroFilter.java