December 2017
Intermediate to advanced
372 pages
8h 46m
English
JSF 2.0 introduced standard resource locations. Resources are artifacts a page or JSF component needs to render properly. Resource examples include CSS stylesheets, JavaScript files, and images.
In JSF 2.0 and newer versions, resources can be placed in a subdirectory under a folder called resources, either at the root of the WAR file or under its META-INF directory. By convention, JSF components know they can retrieve resources from one of these two locations.
In order to avoid cluttering the resources directory, resources are typically placed in a subdirectory. This subdirectory is referred to from the library attribute of JSF components.
For example, we could place a CSS stylesheet called styles.css under /resources/css/styles.css ...