HTML and CSS Reference
In-Depth Information
Listing 1-2 defines the application resource bundle globally in order to be used from the JSF expression language
( #{...} ) using the bundle variable (the JSF expression language will be illustrated in detail in Chapter 3).
Facelets Pages
The firstApplication contains two main pages: the first page ( index.xhtml ) represents the home page, and the other
page is the ( welcome.xhtml ) page, which represents the welcome page. Both pages refer to a template ( simple.xhtml )
page that is defined under the ( firstApplication/src/main/webapp/WEB-INF/templates/ ), as shown in Listing 1-3.
Listing 1-3. The simple.xhtml Template File
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns=" "
xmlns:ui=" "
xmlns:f=" "
xmlns:h= "">
<title><ui:insert name="title">#{bundle['application.defaultpage.title']}</ui:insert></title>
<link href="#{request.contextPath}/css/simple.css" rel="stylesheet" type="text/css"/>
<div id="container">
<div id="header">
<ui:insert name="header">
<div id="content">
<ui:insert name="content">
<div id="footer">
<ui:insert name="footer">
Search WWH ::

Custom Search