O'Reilly logo

Pro JSF and HTML5: Building Rich Internet Components, Second Edition by Zubin Wadia, Allan Lykke Christensen, Hazem Saleh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Composing Page Templates

Mega App relies on two templates under WEB-INF/templates folder:

  1. simple.xhtml template, which is used as a template for the public pages in the application such as the login and registration pages.
  2. main.xhtml template, which is used as a template for all the protected pages in the application such as book requests and book search pages.

simple.xhtml template is a basic template which consists of a header, a content, and a footer. Listing 13-17 shows simple.xhtml template.

Listing 13-17.  simple.xhtml Template

<?xml version='1.0' encoding='UTF-8' ?><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"      xmlns:h="http://xmlns.jcp.org/jsf/html"> <h:head>    <title><ui:insert ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required