When creating a JSF Facelet view document it's common to wrap the content with:
<!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:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
...
</html>
As a single portlet only reflects a potentially small portion of the HTML markup for a page, a JSF portlet returning the above markup for each portlet can be distracting and potentially problematic.
The recommended way to wrap the content of a JSF Facelet view document for a portlet is:
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
...
</f:view>
This results in only the relevant content of the portlet markup being returned to the page.
Although it is not relevant to a portlet, it's important to include <h:head> and <h:body> elements so that JSF can process the Facelet correctly.