Is it possible to tell Mojarra 2.2 which DocType to render in the resulting html pages?
It seems that it always renders the following HTML5 Doctype:
<!DOCTYPE html>
In our facelet template we use the following DocType declaration and we want to keep it in the generated HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The template:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:body>
<ui:insert name="content">Will be replaced</ui:insert>
</h:body>
</html>
The content:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
template="/templates/standalone.xhtml">
<ui:define name="content">
<h:panelGroup>
Foo
</h:panelGroup>
</ui:define>
</ui:composition>
The result:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><body>
Foo
</body>
</html>
I tried it with Mojarra 2.2.7 and 2.2.12 using GlassFish 4.1.