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 ...

Get Pro JSF and HTML5: Building Rich Internet Components, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.