code: public static Class<? extends Servlet> createServlet(String className) {
      try {
        return Class.forName(className).asSubclass(Servlet.class);
      } catch (ClassNotFoundException e) {
        log.warning("The specified class : " + className + " cannot be instantiated " +
            e.getMessage());
      }
      return null;
    }
docs: Reflexion to create the servlet based on the class name. Returns null if the class cannot be
  instantiated.
  
  @param className class name to be created
  @return Class object for passed className argument, or <i>null</i> if no
  matching class name can be found.