O'Reilly logo

JSF 1.2 Components by Ian Hlavats

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

Including UI components and markup

One of the most common techniques for implementing the Composite View design pattern is the Server Side Include (SSI) technique. JSP supports the<jsp:include> server-side include element, and Facelets provides similar functionality through the<ui:include> tag. The tag's src attribute can be used to specify the path of a Facelets page to be included at request time. This technique enables us to externalize common view elements such as headers and footers as separate files and to reuse these by including them in other pages throughout our application.

Including a header and footer

The following example demonstrates how to create a simple composite view using the SSI approach. The header and footer files are included ...

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