JSF engine configuration parameters
In WebSphere® Application Server, you can configure the JavaServer Faces (JSF) engine configuration parameters for optimal performance in a production server environment and in a development environment.
The JSF engine parameters are case-sensitive. If the value specified for a parameter is composed of two or more words that are separated by spaces, you must add quotation marks around the value.
JSF options for MyFaces
JSF parameter name | Description | Default value |
---|---|---|
org.apache.myfaces.DETECT_JAVASCRIPT | false | |
org.apache.myfaces.AUTO_SCROLL | If true, a JavaScript function is rendered that can restore the former vertical scroll on every request. This feature is convenient if you have pages with long lists and you do not want the browser page to jump to the beginning of the page if you trigger a link or button action that stays on the same page. | false |
org.apache.myfaces.ADD_RESOURCE_CLASS | org.apache.myfaces.renderkit.html.util.DefaultAddResource | |
org.apache.myfaces.CHECK_EXTENSIONS_FILTER | This parameter checks for a properly configured Extensions-Filter if it is needed by the web application. | 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. | true |
org.apache.myfaces.FLASH_SCOPE_DISABLED | Set this context parameter to true to disable the Flash Scope that results in the cookie not being sent. | false |
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. | 20 |
org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS | 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. | true |
org.apache.myfaces.STRICT_JSF_2_CC_EL_RESOLVER | Ensures that, when a getType() is called over the source EL expression, components that are working with chained EL expressions can use the metadata information that composite: attribute added. Setting this property to true disables this function. | false |
org.apache.el.parser.COERCE_TO_ZERO | Specifies whether the Expression Language (EL) implementation used by
WebSphere Application Server will coerce null and empty string integer values to a 0 value. The
default value is false - so null and empty string integers will not be coerced to a
0 value.The default value for this parameter has changed from its default in previous WebSphere versions due to a change in the EL 3.0 specification. You can set the
|
|
org.apache.myfaces.DEBUG_PHASE_LISTENER | Enables the DebugPhaseListener in the Development Project Stage. |
true |
com.ibm.ws.jsf.disablealternatefacesconfigsearch | Disables MyFaces searching for META-INF/*.faces-config.xml for only the web application that this context parameter is set on. If the context parameter and the web container custom property are set, the context parameter takes precedence. | false |
com.ibm.ws.jsf.get.facesConfig.via.WAS.classloader (JVM property) | Application bundled commons-logging implementations such as Log4J can conflict with the
WebSphere provided commons-logging implementation when the application classloader mode is set to
PARENT_LAST . Set this JVM property to true to enable the correct
classloading behavior when the application classloader mode is set to
PARENT_LAST . |
false |
General JSF options
JSF parameter name | Description | Default value |
---|---|---|
javax.faces.STATE_SAVING_METHOD | Specifies the 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. Note: If you use javax.faces.STATE_SAVING_METHOD to save on the
client side, there are limitations between JavaServer Pages Standard Tag Library (JSTL) and
Facelets. For certain processing scenarios, JSF Facelets support has limitations in processing all
of the client-side saving requirements for Facelets. For these scenarios, server-side saving is an
option. If client-side state saving is a requirement, then use JSF tags.
|
server |
javax.faces.CONFIG_FILES | Use this parameter to specify a comma-delimited list of context-relative resource paths under which the JSF implementation looks for application configuration resources before it loads a configuration resource named /WEB-INF/facesconfig.xml, if a resource exists. | n/a |
javax.faces.DEFAULT_SUFFIX | Specifies the default suffix for extension-mapped resources that contain JSF components. | .jsp |
javax.faces.LIFECYCLE_ID | Use this parameter to configure an alternative lifecycle ID. | n/a |
com.ibm.ws.jsf.JSF_IMPL_CHECK | Specifies that the JSP files in a web module must be recompiled when the application is restarted because the implementation of JSF that is used has changed. After the application is restarted, the next time a JSP file is accessed for this module the JSP file is recompiled against the selected implementation of JSF specified in the administration console. Subsequent calls to the JSP file do not recompile. The default setting for this option is false. Use this option for development and not in a production environment. | n/a |
javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL | Specifies that the submitted values are decoded as null values instead of
empty strings. Note: This parameter is ignored for components that extend from
UISelectOne /UISelectMany .Note: This parameter has no
effect when EL 3.0 or later is used because a custom
ELResolver is
required. |
false |
Sun RI context parameters that have an equivalent behavior in MyFaces
SUN RI parameter name | Description | RI default | MyFaces equivalent | MyFaces default |
---|---|---|---|---|
com.sun.faces.numberOfViewsInSession | Defines the maximum number of serialized views that are stored in the session. Works with server state saving. | 15 | org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION | 20 |
com.sun.faces.compressViewState | When true the view is compressed after it is serialized and before base64 encoded. Works with client state saving. As of 1.2_09, this option also affects server-side state saving when com.sun.faces.serializeServerState is set to true (this has a large impact of the size of the state in the session when you use this option, at the expense of more CPU.) | true | org.apache.myfaces.COMPRESS_STATE_IN_CLIENT for client-side state saving or org.apache.myfaces.COMPRESS_STATE_IN_SESSION for server-side state saving | false for client-side state saving, true for server-side state saving |
com.sun.faces.validateXml | When true JSF validates the configuration files. | false | org.apache.myfaces.VALIDATE | false |
com.sun.faces.injectionProvider | This parameter specifies a class that implements the InjectionProvider. | n/a | Injection provider is provided by the WebSphere Application Server run time | n/a |
com.sun.faces.serializationProvider | This parameter specifies a class that implements the SerializationProvider SPI. This implementation represents a hook that the JSF implementation uses to enable the alternative Serialization implementations. | n/a | org.apache.myfaces.SERIAL_FACTORY - class must implement org.apache.myfaces.shared_impl.util.serial.SerialFactory SPI instead of com.sun.faces.spi.SerializationProvider | n/a |
com.sun.faces.enabledJSStyleHiding | If true, inline JavaScript rendered by the HTML ResponseWriter implementation is rendered so that the script is hidden from older browser implementations. | false | org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG | true |
com.sun.faces.serializeServerState | If enabled, the component state (not the tree) is serialized before it is stored in the session. This might be desirable for applications that have issues with view state being sensitive to model changes. | false | org.apache.myfaces.SERIALIZE_STATE_IN_SESSION | true |
For transitioning users: Previous to Version 8.5.5.3, when you use
javax.faces.component.UIComponent.findComponent
(String expression), an incorrect
UIComponent might be returned. In this release of the product, the
javax.faces.component.UIComponent.findComponent
returns the correct UIComponent.
The com.ibm.ws.jsf.FIND_COMPONENT_RECURSE_CHILD_ID
JSF context parameter must be
set to true.