} catch (NullPointerException ex) {
// We failed to load the Filter, let's try directly.
f = (Filter) Thread.currentThread().getContextClassLoader()
.loadClass(fClass).newInstance();
}
FilterConfigImpl fc = new FilterConfigImpl(sc);
fc.setFilter(f);
if (filterName == null) {
if (sc.getInitParameter(APPLICATION_NAME) != null) {
filterName = sc.getInitParameter(APPLICATION_NAME);
} else {
filterName = f.getClass().getSimpleName();
}
}
fc.setFilterName(filterName);
filterChain.addFilter(fc);
logger.info("Installing Filter {}", filterName);
}
}