-
Book Overview & Buying
-
Table Of Contents
JSF 1.2 Components
By :
Java web applications consist of compiled Java classes, XML configuration files, static resources, and other artifacts. To enable Facelets in our JSF application, we must configure our web.xml file with a few context parameters, which are used by the Facelets framework.
Mapping the FacesServlet
The FacesServlet is the front controller of the JSF application. Incoming requests are mapped to this servlet using different URI patterns. Although it is possible to map any arbitrary prefix and/or file extension to the FacesServlet, for simplicity, we have chosen to use the .jsf file extension for both the FacesServlet mapping pattern and for our Facelets XHTML documents.
The following example demonstrates some of the context parameters that we set in web.xml to enable the Facelets ViewHandler. Notice that we set the facelets.REFRESH_PERIOD parameter to true to enable more verbose output during page development. This parameter...
Change the font size
Change margin width
Change background colour