Invalid html output:
<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> ...
The main template:
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:fn="http://java.sun.com/jsp/jstl/functions"> <h:head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title><h:outputText value="dmw #{title}"/></title> <h:outputStylesheet library="#{uiSkin}" name="css/layout.css" /> <h:outputStylesheet library="standard" name="css/developer.css" rendered="#{developMode}" /> ... </h:head> <h:body>
Example of the included page:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <ui:composition> ... </ui:composition> </html>
Used Versions:
<jsf-api.version>2.1</jsf-api.version> <jsf-impl.version>2.1.21</jsf-impl.version> <richfaces.version>4.3.2.Final</richfaces.version> <prettyfaces.version>3.3.3</prettyfaces.version> <tomahawk.version>1.1.14</tomahawk.version>
When I delete all ui: include and ui: insert tags, everything is fine. I am building a smaller Testproject, which also works as intended. An error occurs when the included page loads. The ui: insert icon, which cannot be resolved, does not result in an error. I think this has something to do with setting the rendering.
I tried a few entries in faces-config, but without sucess. The following entry removes the unwanted ad as well as the doctype.
<faces-config-extension> <facelets-processing> <file-extension>.xhtml</file-extension> <process-as>xml</process-as> </facelets-processing> </faces-config-extension>
XML prolog / command not removed from XHTML output
I donβt know where it came from? Somebody knows?
source share