JSF engine configuration parameters
In WAS, we can configure the Java Server Faces (JSF) engine configuration parameters for optimal performance in a production server environment and for the needs of developers in a development environment.
The JSF engine parameters are case sensitive. If the value specified for a parameter is comprised of two or more words separated by spaces, add quotation marks around the value.
JSF options using SUN RI
- com.sun.faces.numberOfViewsInSession
Number of views that are stored in the session when Server-Side State Saving is used. If set to true while client-side state saving is being used, reduces the number of bytes sent to the client by compressing the state before it is encoded and written as a hidden field. The default for this parameter is 15.
- com.sun.faces.numberOfLogicalViews
Number of logical views that are stored in the session when Server-Side State Saving is used. The default for this parameter is 15.
- com.sun.faces.enableHighAvailability
If set to true while server-side state saving is used, a serialized representation of the view is stored on the server. This provides failover and sever clustering support. The default for this parameter is false.
- com.sun.faces.injectionProvider
Defines an injection provider used for JSF annotations.
- com.sun.faces.serializationProvider
Defines a serialization provider used for serializing JSF objects into session.
- com.sun.faces.responseBufferSize
Define the size of the response buffer for a JSF response. The default for this parameter is 1048.
- com.sun.faces.clientStateWriteBufferSize
The default for this parameter is 8192.
- com.sun.faces.expressionFactory
Default EL Expression Factory to use. The default for this parameter is org.apache.el.ExpressionFactoryImpl.
- com.sun.faces.clientStateTimeout
The timeout value used for client side state saving. Once the value set has been reached then the state is lost. Default is infinite.
- com.sun.faces.displayConfiguration
The default for this parameter is false.
- com.sun.faces.validateXml
The default for this parameter is false.
- com.sun.faces.verifyObjects
The default for this parameter is false.
- com.sun.faces.forceLoadConfiguration
The default for this parameter is false.
- com.sun.faces.diableVersionTracking
The default for this parameter is false.
- com.sun.faces.enableHtmTagLibValidator
The default for this parameter is false.
- com.sun.faces.prerefXHTML
The default for this parameter is false.
- com.sun.faces.compressViewState
The default for this parameter is true.
- com.sun.faces.compressJava Scipt
The default for this parameter is true.
- com.sun.faces.sendPoweredByHeader
The default for this parameter is true.
- com.sun.faces.enableJSStyleHiding
The default for this parameter is false.
- com.sun.faces.writeStateAtFormEnd
The default for this parameter is true.
- com.sun.faces.enableLazyBeanValidation
The default for this parameter is ture.
- com.sun.faces.enableLoadBundle11Compatibility
The default for this parameter is false.
- com.sun.faces.enableRestoreView11Compatibilty
The default for this parameter is false.
- com.sun.face.serializeServerState
The default for this parameter is false.
JSF options for MyFaces
- org.apache.myfaces.RESOURCE_VIRTUAL_PATH
The default for this parameter is /faces/myFacesExtensionResource.
- org.apache.myfaces.PRETTY_HTML
The default for this parameter is true.
- org.apache.myfaces.ALLOW_JAVASCRIPT
The default for this parameter is true.
- org.apache.myfaces.DETECT_JAVASCRIPT
The default for this parameter is false.
- org.apache.myfaces.AUTO_SCROLL
The default for this parameter is false.
- org.apache.myfaces.ADD_RESOURCE_CLASS
The default for this parameter is org.apache.myfaces.renderkit.html.util.DefaultAddResource.
- org.apache.myfaces.CHECK_EXTENSIONS_FILTER
The default for this parameter is true.
- org.apache.myfaces.READONY_AS_DISABLED_FOR_SELECTS
The default for this parameter is true.
- org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
Set this option to true to serialize the state to a byte stream before it is written to the session. If this option is set to false, the state is not serialized to a byte stream. This option is only applicable if the state saving method is set to server. The default for this parameter is true.
- org.apache.myfaces.COMPRESS_STATE_IN_SESSION
Set this option to true to compress the serialized state before it is written to the session. If this option is set to false, the state is not compressed. This option is only applicable if the state saving method is set to server and if org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is set to true. The default for this parameter is true.
- org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION
Defines the number of the latest views that are stored in session. This option is only applicable if the state saving method is set to server. The default for this parameter is 20.
JSF options using SUN RI or MyFaces
The following options are valid for both the SUN RI and the MyFaces implementations.
- javax.faces.STATE_SAVING_METHOD
Location where state information is saved. Valid values are 'server', which is saved in HttpSession, and 'client', which is saved as a hidden field in the form. The default for this parameter is server.
- javax.faces.CONFIG_FILES
a comma-delimited list of context-relative resource paths under which the JSF implementation looks for application configuration resources before loading a configuration resource named /WEB-INF/facesconfig.xml, if a resource exists.
- javax.faces.DEFAULT_SUFFIX
Default suffix for extension-mapped resources that contain JSF components. The default for this parameter is .jsp.
- javax.faces.LIFECYCLE_ID
Use this parameter to configure an alternate lifecycle ID.
- com.ibm.ws.jsf.JSF_IMPL_CHECK
The JSPs in a Web module must be recompiled when the application is restarted because the implementation of JSF used has changed. After the application is restarted, the next time a JSPs is accessed for this module the JSP is recompiled against the selected implementation of JSF specified in the administration console. Subsequent calls to the JSP do not cause a recompile.
The default setting for this option is false. Use this option for development and not in a production environment.
IBM options for JSF runtime
- com.ibm.ws.jsf.JSP_UPDATE_CHECK
This parameter monitors Faces JaaverServer Pages (JSP) files for modifications and synchronizes a running server with the changes without restarting the server. If this parameter is set to false or removed from the deployment descriptor, any changes made to Faces JSPs might not be seen by the server until it is restarted. Set this parameter to true while developing and debugging the Faces JSPs to improve the performance of the development environment.
- com.ibm.ws.jsf.LOAD_FACES_CONFIG_AT_STARTUP
Specifies to load the JSF runtime when the appserver starts up. If this parameter is set to false or removed, JSF runtime is loaded and initialized when the first JSF request is processed. This might disable custom JSF extensions such as factories defined in the project.
- com.ibm.ws.jsf.JSF_IMPL_CHECK
Set the com.ibm.ws.jsf.JSF_IMPL_CHECK parameter to true to check at application restart if the SUN RI and MyFaces implementations were switched. If the implementation has switched, then the runtime removes any generated JSPs from the temp directory and the JSP file is retranslated the next time it is requested.
Related concepts
Java Server Faces
Related tasks
Set JSF engine parameters
Set Java Server Faces implementation
Manage Java Server Faces implementations using scripting
Related
JSF engine configuration parameters