@Override
public void contextInitialized(ServletContextEvent servletContextEvent) {
ServletContext servletContext = servletContextEvent.getServletContext();
//Install GeronimoWebXml instance to the servletContext.
WebAppInfo webAppInfo = (WebAppInfo) servletContext.getAttribute(WebApplicationConstants.WEB_APP_INFO);
Bundle bundle = ((BundleContext) servletContext.getAttribute(WABApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE)).getBundle();
GeronimoWebXml webXml = new GeronimoWebXml(bundle, webAppInfo, servletContext.getInitParameter("org.apache.myfaces.DELEGATE_FACES_SERVLET"));
servletContext.setAttribute(WebXml.class.getName(), webXml);
servletContext.setAttribute(FacesConfigurationMergerFactory.class.getName(), new GeronimoFacesConfigurationMergerFactory());
servletContext.setAttribute(FaceletConfigResourceProviderFactory.class.getName(), new GeronimoFaceletConfigResourceProviderFactory());