JSF doesn't work with HTML (or xhtml). It works with JSF View templates. Depending on how things are set up, JSF may
generate HTML or XHTML, but one of the advantages of JSF is that the renderers are plug-replaceable components. You could just as easily render a PDF.
The confusion here is because ".xhtml" is the popular file extension for Facelets templates, but Facelets templates aren't (X)HTML, they're JSF XML.
The Facelets renderer is generating an XHTML doctype and you're providing one manually, and that's one more DOCTYPE than the web browser wants to see.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.