WebXmlProcessor processor = new WebXmlProcessor(context); if (!processor.isFacesServletPresent()) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE,
SAXParserFactory factory = getConfiguredFactory(); if (in != null) { try { parser.parse(in, new WebXmlHandler()); } catch (ParserConfigurationException | SAXException | IOException e) { warnProcessingError(e, context); facesServletPresent = true; return; parser.parse(fragmentStream, new WebXmlHandler()); } catch (IOException | ParserConfigurationException | SAXException e) { warnProcessingError(e, context); facesServletPresent = true; return;
WebXmlProcessor webXmlProcessor = new WebXmlProcessor(context); if (mappingsAdded == null) { if (!webXmlProcessor.isFacesServletPresent()) { if (!webConfig.isOptionEnabled(ForceLoadFacesConfigFiles)) { LOGGER.log(FINE, "No FacesServlet found in deployment descriptor - bypassing configuration"); if (webXmlProcessor.isDistributablePresent()) { webConfig.setOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable, true); context.setAttribute(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable.getQualifiedName(), TRUE); boolean isErrorPagePresent = webXmlProcessor.isErrorPagePresent(); associate.setErrorPagePresent(isErrorPagePresent); context.setAttribute(ERROR_PAGE_PRESENT_KEY_NAME, isErrorPagePresent);
WebXmlProcessor webXmlProcessor = new WebXmlProcessor(context); if (mappingsAdded == null) { if (!webXmlProcessor.isFacesServletPresent()) { if (!webConfig.isOptionEnabled(ForceLoadFacesConfigFiles)) { LOGGER.log(FINE, "No FacesServlet found in deployment descriptor - bypassing configuration"); if (webXmlProcessor.isDistributablePresent()) { webConfig.setOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable, true); context.setAttribute(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable.getQualifiedName(), TRUE); boolean isErrorPagePresent = webXmlProcessor.isErrorPagePresent(); associate.setErrorPagePresent(isErrorPagePresent); context.setAttribute(ERROR_PAGE_PRESENT_KEY_NAME, isErrorPagePresent);
WebXmlProcessor webXmlProcessor = new WebXmlProcessor(context); if (mappingsAdded == null) { if (!webXmlProcessor.isFacesServletPresent()) { if (!webConfig.isOptionEnabled(ForceLoadFacesConfigFiles)) { if (LOGGER.isLoggable(Level.FINE)) { if (webXmlProcessor.isDistributablePresent()) { webConfig.setOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable, true); context.setAttribute(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable.getQualifiedName(), Boolean.TRUE); boolean isErrorPagePresent = webXmlProcessor.isErrorPagePresent(); associate.setErrorPagePresent(isErrorPagePresent); context.setAttribute(RIConstants.ERROR_PAGE_PRESENT_KEY_NAME,
WebXmlProcessor webXmlProcessor = new WebXmlProcessor(context); if (mappingsAdded == null) { if (!webXmlProcessor.isFacesServletPresent()) { if (!webConfig.isOptionEnabled(ForceLoadFacesConfigFiles)) { LOGGER.log(FINE, "No FacesServlet found in deployment descriptor - bypassing configuration"); if (webXmlProcessor.isDistributablePresent()) { webConfig.setOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable, true); context.setAttribute(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable.getQualifiedName(), TRUE); boolean isErrorPagePresent = webXmlProcessor.isErrorPagePresent(); associate.setErrorPagePresent(isErrorPagePresent); context.setAttribute(ERROR_PAGE_PRESENT_KEY_NAME, isErrorPagePresent);
SAXParserFactory factory = getConfiguredFactory(); if (in != null) { try { parser.parse(in, new WebXmlHandler()); } catch (ParserConfigurationException | SAXException | IOException e) { warnProcessingError(e, context); facesServletPresent = true; return; parser.parse(fragmentStream, new WebXmlHandler()); } catch (IOException | ParserConfigurationException | SAXException e) { warnProcessingError(e, context); facesServletPresent = true; return;
SAXParserFactory factory = getConfiguredFactory(); if (in != null) { try { parser.parse(in, new WebXmlHandler()); } catch (ParserConfigurationException | SAXException | IOException e) { warnProcessingError(e, context); facesServletPresent = true; return; parser.parse(fragmentStream, new WebXmlHandler()); } catch (IOException | ParserConfigurationException | SAXException e) { warnProcessingError(e, context); facesServletPresent = true; return;
SAXParserFactory factory = getConfiguredFactory(); if (in != null) { try { parser.parse(in, new WebXmlHandler()); } catch (Exception e) { warnProcessingError(e, context); facesServletPresent = true; return; parser.parse(fragmentStream, new WebXmlHandler()); } catch (Exception e) { warnProcessingError(e, context); facesServletPresent = true; return;
/** * <p>Parse the web.xml for the current application and scan * for a FacesServlet entry, if found, set the * <code>facesServletPresent</code> property to true. * @param context the ServletContext instance for this application */ private void scanForFacesServlet(ServletContext context) { SAXParserFactory factory = getConfiguredFactory(); try { SAXParser parser = factory.newSAXParser(); parser.parse(context.getResourceAsStream(WEB_XML_PATH), new WebXmlHandler()); } catch (Exception e) { // This probably won't happen since the container would // catch it before we would, but, if we catch an exception // processing the web.xml, set facesServletFound to true to // default to our previous behavior of processing the faces // configuration. if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.log(Level.WARNING, MessageFormat.format("Unable to process deployment descriptor for context ''{0}''", getServletContextIdentifier(context))); } facesServletPresent = true; } } // END scanForFacesServlet
/** * <p>When instantiated, the web.xml of the current application * will be scanned looking for a references to the * <code>FacesServlet</code>. <code>isFacesServletPresent()</code> * will return the appropriate value based on the scan.</p> * * @param context the <code>ServletContext</code> for the application * of interest */ WebXmlProcessor(ServletContext context) { if (context != null) { scanForFacesServlet(context); } } // END WebXmlProcessor
/** * <p>When instantiated, the web.xml of the current application * will be scanned looking for a references to the * <code>FacesServlet</code>. <code>isFacesServletPresent()</code> * will return the appropriate value based on the scan.</p> * * @param context the <code>ServletContext</code> for the application * of interest */ WebXmlProcessor(ServletContext context) { if (context != null) { scanForFacesServlet(context); } } // END WebXmlProcessor
/** * <p>When instantiated, the web.xml of the current application * will be scanned looking for a references to the * <code>FacesServlet</code>. <code>isFacesServletPresent()</code> * will return the appropriate value based on the scan.</p> * * @param context the <code>ServletContext</code> for the application * of interest */ WebXmlProcessor(ServletContext context) { if (context != null) { scanForFacesServlet(context); } } // END WebXmlProcessor
/** * <p>When instantiated, the web.xml of the current application * will be scanned looking for a references to the * <code>FacesServlet</code>. <code>isFacesServletPresent()</code> * will return the appropriate value based on the scan.</p> * * @param context the <code>ServletContext</code> for the application * of interest */ WebXmlProcessor(ServletContext context) { if (context != null) { scanForFacesServlet(context); } } // END WebXmlProcessor
/** * <p>When instantiated, the web.xml of the current application * will be scanned looking for a references to the * <code>FacesServlet</code>. <code>isFacesServletPresent()</code> * will return the appropriate value based on the scan.</p> * @param context the <code>ServletContext</code> for the application * of interest */ WebXmlProcessor(ServletContext context) { if (context != null) { scanForFacesServlet(context); } } // END WebXmlProcessor