JSF 2.2, as a part of Java EE 7, introduced the ability to theme and style websites under a facility known as the Resource Library Contracts. The idea of contracts is about reusing Facelets dynamically at runtime. It is possible now with contracts to switch between resources without having to redeploy an application. Contracts can also be declared statically for pages that match a URL pattern.
The specification reserves a specially named folder called
/contracts as the parent folder for the Resource Library Contracts. This folder is the default one. If you already have a folder named as this view, then you will have to refactor by name, unfortunately.
There is another default location,
META-INF/contracts, on the classpath for JARs. This location allows the resource library contracts to be packaged as JAR for distribution to the third-party customers.
/contracts folder, a developer can define named contracts (or themes). You can only create folders inside...