/** * Instantiates the given Servlet class and performs any required * resource injection into the new Servlet instance before returning * it. */ @Override public <T extends Servlet> T createServlet(Class<T> clazz) throws ServletException { try { return createServletInstance(clazz); } catch (Throwable t) { throw new ServletException("Unable to create Servlet from " + "class " + clazz.getName(), t); } }
servlet = ((StandardContext)getParent()).createServletInstance( servletClass); } catch (ClassCastException e) {