Reader small image

You're reading from  Java EE 7 Development with NetBeans 8

Product typeBook
Published inJan 2015
Reading LevelIntermediate
PublisherPackt
ISBN-139781783983520
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
David R Heffelfinger
David R Heffelfinger
author image
David R Heffelfinger

David Heffelfinger is the Chief Technology Officer of Ensode Technology, LLC, a software consulting firm based in the greater Washington DC area. He has been architecting, designing, and developing software professionally since 1995, and has been using Java as his primary programming language since 1996. He has worked on many large-scale projects for several clients including the US Department of Homeland Security, Freddie Mac, Fannie Mae, and the US Department of Defense. He also has a Masters degree in Software Engineering from Southern Methodist University. David is Editor-in-Chief of Ensode.net (http://www.ensode.net), a website about Java, Linux, and other technology topics.
Read more about David R Heffelfinger

Right arrow

Facelets templating


One advantage that Facelets has over JSP is its templating mechanism. Templates allow us to specify page layout in one place. Then, we can have template clients that use the layout defined in the template. Since most web applications have consistent layout across pages, using templates makes our applications much more maintainable because changes to the layout need to be made in a single place. If at one point we need to change the layout for our pages (for example, add a footer or move a column from the left side of the page to the right side of the page), we only need to change the template and the change is reflected in all the template clients.

Adding the Facelets template

We can add a Facelets template to our project simply by going to File | New File, selecting the JavaServer Faces category, and selecting the Facelets Template file type.

NetBeans provides very good support for Facelets templating. It provides several templates "out of the box" using common web page...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Java EE 7 Development with NetBeans 8
Published in: Jan 2015Publisher: PacktISBN-13: 9781783983520

Author (1)

author image
David R Heffelfinger

David Heffelfinger is the Chief Technology Officer of Ensode Technology, LLC, a software consulting firm based in the greater Washington DC area. He has been architecting, designing, and developing software professionally since 1995, and has been using Java as his primary programming language since 1996. He has worked on many large-scale projects for several clients including the US Department of Homeland Security, Freddie Mac, Fannie Mae, and the US Department of Defense. He also has a Masters degree in Software Engineering from Southern Methodist University. David is Editor-in-Chief of Ensode.net (http://www.ensode.net), a website about Java, Linux, and other technology topics.
Read more about David R Heffelfinger