So how do we do it?
One of the simplest ways is to wrap our page in a
<f:view />tag. The tag wraps the
<body/>elements in our HTML page. In the example above this is accomplished as shown below: The code for the backing bean is shown below:
The Netbeans Maven project can be found here: JSF Dynamic Encoding