TOC PREV NEXT INDEX

Configuring for Facelets


To configure TimeZone to support Facelets, we need to modify both the deployment descriptor (web.xml or web_myfaces.xml) and the JavaServer Faces configuration file (faces-config.xml).

1. Add a context parameter to the deployment descriptor file (web.xml or web_myfaces.xml), to inform the application server that the default file extension for Facelets is .xhtml, since some application servers assume .jsp or .jspx extensions.
<context-param>
 
		<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
 
		<param-value>.xhtml</param-value>
 
</context-param>
 
2. For development purposes, add a context parameter to the deployment descriptor file, to enable Facelets debug logging.
<context-param>
 
		<param-name>facelets.DEVELOPMENT</param-name>
 
		<param-value>true</param-value>
 
</context-param>
 
3. Enable some strict verifications in JSF, by adding these context parameters to the deployment descriptor file.
<context-param>
 
		<param-name>com.sun.faces.validateXml</param-name>
 
		<param-value>true</param-value>
 
		<description>
 
			Set this flag to true, if you want the JavaServer Faces Reference
 
			Implementation to validate the XML in your faces-config.xml resources
 
			against the DTD. Default value is false.
 
		</description>
 
</context-param>
 

 
<context-param>
 
		<param-name>com.sun.faces.verifyObjects</param-name>
 
		<param-value>true</param-value>
 
		<description>
 
			Set this flag to true, if you want the JavaServer Faces Reference 
 
			Implementation to verify that all of the application objects you have 
 
			configured (components, converters, renderers, and validators) can be 
 
			successfully created. Default value is false.
 
		</description>
 
</context-param>
 

 
4. Set the application view handler in the JavaServer Faces configuration file (faces-config.xml).
<application>
 
		<view-handler>
 
			com.icesoft.faces.facelets.D2DFaceletViewHandler
 
		</view-handler>
 
</application>
 

 


Copyright 2005-2009. ICEsoft Technologies, Inc.
TOC PREV NEXT INDEX