WebBundleDescriptor wDesc = context.getModuleMetaData(WebBundleDescriptor.class);
if( wDesc != null) {
wDesc.setExtensionProperty(WELD_EXTENSION, "true");
// Add the Weld Listener if it does not already exist..
wDesc.addAppListenerDescriptorToFirst(new AppListenerDescriptorImpl(WELD_LISTENER));
// Add Weld Context Listener - this listener will ensure the WeldELContextListener is used
// for JSP's..
wDesc.addAppListenerDescriptor(new AppListenerDescriptorImpl(WELD_CONTEXT_LISTENER));
// Adding Weld ConverstationFilter if there is filterMapping for it and it doesn't exist already.
// However, it will be applied only if web.xml has mapping for it.
// Doing this here to make sure that its done only for CDI enabled web application
for (ServletFilterMapping sfMapping : wDesc.getServletFilterMappings()) {
String displayName = ((ServletFilterMappingDescriptor)sfMapping).getDisplayName();