HtmlBody is a UIOutput that renders a <body> element for webapps and a <div> for portlets.

General Usage

The usage of h:body in webapps is the same as with portlets. However, the surrounding tag in a webapp is <html> whereas the surrounding tag in a portlet is f:view.

Source Code

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"
	<title>This is the title of the Facelet page</title>
	<h:outputText value="This is a Facelet page" />
<?xml version="1.0" encoding="UTF-8"?>
<f:view xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" >
	<h:head />
		<h:outputText value="This is a Facelet portlet" />
Liferay Faces Bridge Implementation 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20