TL;DR: I can\'t get the DOCTYPE header to appear on my JSF pages.
I just inherited a JSF 1.2 project that\'s having some display issues under IE. I\
Remove <ui:composition>
from your master template, which is the headertemplate.xhtml
. It doesn't belong there. The <ui:composition>
will strip all other content outside the tag.
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<ui:insert name="body" />
</body>
</html>
Note that the doctype (and xml) declaration is unnecessary in template definition files (the ones using <ui:composition>
). Just remove them.
You must remember one thing, that everything outside ui:compostion tags is simply cut out, so the DOCTYPE declaration in your case is simply ignored.