Google News
logo
JSF - Interview Questions
How to relocate web resources in JSF (JavaServer Faces) application?
JSF provides a facility to place your resources at any section of your web page and render it to another section. You can relocate your resource by specifying the target attribute.
 
JSF Web Resources :
 
JSF web resources are the resources which are required for proper rendering in the web application. It includes images, script files, and any user-created component libraries.
 
JSF provides a standard way to store your web resources. You can use any one of the following to store your resources.
 
* It must be stored in a subdirectory of a resources directory at the web application root: resources/resource-identifier.

* A resource packaged in the web application's classpath must be in a subdirectory of the META-INF/resources directory within a web application : META-INF/resources/resource-identifier. You can use this file structure to package resources in a JAR file bundled in the web application.

The JavaServer Faces runtime will look for the resources in the preceding listed locations, in that order.
Advertisement