@Override public ServletRegistration.Dynamic addServlet(String servletName, String className) { if (SecurityUtil.isPackageProtectionEnabled()) { return (ServletRegistration.Dynamic) doPrivileged("addServlet", new Object[] {servletName, className}); } else { return context.addServlet(servletName, className); } }
@Override public ServletRegistration.Dynamic addServlet( String servletName, Class<? extends Servlet> servletClass) { if (SecurityUtil.isPackageProtectionEnabled()) { return (ServletRegistration.Dynamic) doPrivileged("addServlet", new Object[] {servletName, servletClass.getName()}); } else { return context.addServlet(servletName, servletClass); } }