For the majority of the changes in JavaServer Faces 2.0, please see the preface of the JavaServer Faces 2.0 specification. Any differences between the specification and the Mojarra 2.0.0 implementation are outlined below.
The following table describes the new initialization parameters introduced in this release.
|Paramter Name||Description||Default Value|
|com.sun.faces.enableAgressiveSessionDirtying||If true, makes it so every session attribute is touched in for every request through the lifecycle. This makes it much harder to make mistakes that cause session replication to fail.||false|
The following table describes the rem remainder initialization parameters supported in this release.
|Paramter Name||Description||Default Value|
|javax.faces.ProjectStage||Configures the runtime behavior of this application. Valid values are Prodction, UnitTest, SystemTest, and Development. See the specification or this blog entry for further details.||Production|
|javax.faces.RESOURCE_EXCLUDES||A space separated list of resource extensions for types that shouldn't be served by the ResourceHandler implementation. See the specification for further details.||.class .jsp .jspx .properties .xhtml|
|com.sun.faces.defaultResourceMaxAge||This affects the value of the Expires response header that will be sent for a resource. The logic is basically Date.getTime() + valueOf(defaultResourceManxAge). Increase this value to increase the amount of time that a Resource is valid.||604800|
|com.sun.faces.resourceUpdateCheckPeriod||When javax.faces.PROJECT_STATE is Production, UnitTest, or SystemTest resource paths will be cached to reduce the overhead of resource path compuation. By default, updates (i.e. new files, new directories, new versions, etc.) will be checked for every 5 minutes. If a change is detected, the cache will be cleared and rebuilt. If the value of this option is -1, the cache will never be cleared and new resources will not be picked up.||5|
|com.sun.faces.compressableMimeTypes||Specify mime types that should be gzip compressed. Mime types can be specified by their exact name (i.e. text/css) or a wildcard can be used after the slash (i.e. text/*). The resource will not be compressed on each request, instead when building the cache, the resource will be compressed to a temporary directory and those bytes will be served instead.||NONE|
When enabled, the runtime initialization and default ResourceHandler implementation will use threads to perform their functions. Set this value to false if threads aren't desired (as in the case of running within the Google Application Engine).
Note that when this option is disabled, the ResourceHandler will not pick up new versions of resources when ProjectStage is development.
As of 2.0.0, children of UIInput and UIOutput components will not be rendered by the default renderer implementations. Set this option to true if this behavior is required, but note that doing so may cause issues when using Ajax. See Issue 1154 for details.
The value of this context init parameter is a whitespace separated list of values that control which class packages are scanned for annotations.
To restrict which classes are scanned in WEB-INF/classes, simple add the package names to the list.
To restrict which jars/packages are scanned, use the following entry format: jar:<jar name>:<comma separated list of packages> So an example would be: jar:a.jar:com.acme.package1,com.acme.package2
Note that anything not explicitly listed when using this option means it won't be scanned. For instance, if a single package is listed to be scanned in WEB-INF/classes, no jar files in WEB-INF/lib will be scanned. However, values do support wildcards. For example:
<context-param> <param-name> com.sun.faces.annotationScanPackages </param-name> <param-value> * jar:a.jar:test2 </param-value> <context-param>
In this case, the wildcard, '*', is specified for packages in WEB-INF/classes. This means all packages there will be scanned.
The wildcard works for the jar specification as well. For example: - jar:*:* -> all jars and packages contained within will be scanned - jar:a.jar:* -> all packages in a.jar will be scaned
The value of this option is a fully qualfified class that extends the com.sun.faces.facelets.FaceletFactory abstract class. This option allows developers to customize the behavior or completely replace the default com.sun.faces.facelets.FaceletFactory implementation.
Some rules about what is expected of custom implementations.If the custom implementation has a public single argument constructor where the argument type is com.sun.faces.facelets.FaceletFactory, the default FaceletFactory implementation will be passed to the constructor. If the single argument constructor is not present, the custom implementation will be constructed by invoking a public no-argument constructor.
Mojarra Implementation team blogs