Search in sources :

Example 1 with UnknownClassException

use of org.apache.shiro.util.UnknownClassException in project shiro by apache.

the class EnvironmentLoader method webEnvironmentClassFromServletContext.

private Class<? extends WebEnvironment> webEnvironmentClassFromServletContext(ServletContext servletContext) {
    Class<? extends WebEnvironment> webEnvironmentClass = null;
    String className = servletContext.getInitParameter(ENVIRONMENT_CLASS_PARAM);
    if (className != null) {
        try {
            webEnvironmentClass = ClassUtils.forName(className);
        } catch (UnknownClassException ex) {
            throw new ConfigurationException("Failed to load custom WebEnvironment class [" + className + "]", ex);
        }
    }
    return webEnvironmentClass;
}
Also used : UnknownClassException(org.apache.shiro.util.UnknownClassException) ConfigurationException(org.apache.shiro.config.ConfigurationException)

Aggregations

ConfigurationException (org.apache.shiro.config.ConfigurationException)1 UnknownClassException (org.apache.shiro.util.UnknownClassException)1