HTML and CSS Reference
In-Depth Information
In the logout() method, the session is invalidated and the user is forwarded to the home page. Notice that all of
the application pages are using the main.xhtml template under /WEB-INF/templates folder. Listing 10-7 shows the
main.xhtml template page.
Listing 10-7. main.xhtml Template Page
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns=" "
xmlns:ui=" "
xmlns:h=" " >
<title><ui:insert name="title">#{bundle['application.defaultpage.title']}</ui:insert></title>
<link href="#{request.contextPath}/css/main.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">
The template uses main.css style file and it has three main parts: the header, the footer, and the content.
The content should be replaced by the different pages in the application (home, weather, and registration pages).
The application's text is externalized in the file which is shown in Listing 10-8.
Listing 10-8. File = Username
user.password = Password = Email
user.fname = First name
user.lname = Last name
user.profession = Profession
user.zipCode = Zip code
Search WWH ::

Custom Search