protected Filter getDelegateFilter(ServletRequest request) {
ServletContext servletContext = getServletContext();
ModuleManagementFacade moduleManagementFacade = ImpalaServletUtils.getModuleManagementFacade(servletContext);
WebAttributeQualifier qualifier = getWebAttributeQualifier(moduleManagementFacade);
String applicationId = getApplicationId(moduleManagementFacade);
String attributeName = qualifier.getQualifiedAttributeName(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, applicationId, targetModuleName);
WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext, attributeName);
if (applicationContext == null) {
throw new ConfigurationException("No root web application context associated with module '" + targetModuleName + "'");