// the ServletResponse.
ExternalContext externalContext = new ServletExternalContextImpl(
servletContext, null, null);
// Parse and validate the web.xml configuration file
WebXml webXml = WebXml.getWebXml(externalContext);
if (webXml == null) {
if (log.isLoggable(Level.WARNING)) {
log.warning("Couldn't find the web.xml configuration file. "
+ "Abort initializing MyFaces.");
}
return;
} else if (webXml.getFacesServletMappings().isEmpty()) {
// check if the FacesServlet has been added dynamically
// in a Servlet 3.0 environment by MyFacesContainerInitializer
Boolean mappingAdded = (Boolean) servletContext.getAttribute(FACES_SERVLET_ADDED_ATTRIBUTE);
if (mappingAdded == null || !mappingAdded)
{