static {
   if (Classes.isAvailable(HTTP_SERVLET_REQUEST_FQCN)) {
     HTTP_SERVLET_REQUEST_WRAPPER_CLASS = Classes.forName(HTTP_SERVLET_REQUEST_WRAPPER_FQCN);
   } else {
     HTTP_SERVLET_REQUEST_WRAPPER_CLASS = null;
   }
 }
Exemplo n.º 2
0
 /**
  * Return the {@link ConfigFactory} implementation class to use, either the default {@link
  * com.stormpath.sdk.servlet.config.impl.DefaultConfigFactory} or a custom class if specified.
  *
  * @param servletContext current servlet context
  * @return the ConfigFactory implementation class to use
  * @see #CONFIG_FACTORY_CLASS_PARAM_NAME
  * @see com.stormpath.sdk.servlet.config.impl.DefaultConfigFactory
  */
 protected Class<?> determineConfigFactoryClass(ServletContext servletContext) {
   String className = servletContext.getInitParameter(CONFIG_FACTORY_CLASS_PARAM_NAME);
   className = Strings.trimWhitespace(className);
   if (className != null) {
     try {
       return Classes.forName(className);
     } catch (UnknownClassException ex) {
       throw new IllegalStateException(
           "Failed to load custom ConfigFactory class [" + className + "]", ex);
     }
   } else {
     return DefaultConfigFactory.class;
   }
 }