Resource library contracts

Resource library contracts is a new JSF 2.2 feature. It builds on Facelets templates to allow us to build "themable" web applications. For example, we could have an application with multiple customers or we could render the application user interface so that each user sees their own company's logo after logging in. Alternatively, we could have the user select from a predefined set of themes, which is exactly what we are going to do in our next example.

We can create a resource library contract by going to File | New and selecting JSF Resource Library Contract from the JavaServer Faces category in the New File wizard.

Resource library contracts

We ...

Get Java EE 7 Development with NetBeans 8 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.