0% found this document useful (0 votes)
505 views

JSF Guide

This document provides an overview of deploying JavaServer Faces (JSF) applications on JBoss Application Server 6. It discusses the JSF deployer and how it recognizes JSF applications. It also describes how to configure the default JSF implementation, use alternate implementations, bundle JSF jars with the application, and configure JSF context parameters. The quick start section demonstrates a simple "Hello World" JSF application with only 3 files.

Uploaded by

Yaya Karya
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
505 views

JSF Guide

This document provides an overview of deploying JavaServer Faces (JSF) applications on JBoss Application Server 6. It discusses the JSF deployer and how it recognizes JSF applications. It also describes how to configure the default JSF implementation, use alternate implementations, bundle JSF jars with the application, and configure JSF context parameters. The quick start section demonstrates a simple "Hello World" JSF application with only 3 files.

Uploaded by

Yaya Karya
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

JBoss AS 6.

0 JSF Guide

JSF with JBoss


Application Server 6
by Stan Silvert
I. Introduction and Quick Start ............................................................................................ 1
1. Introduction ......................................................................................................... 3
2. Quick Start .......................................................................................................... 5
2.1. Create your WAR structure ......................................................................... 5
2.2. Create a minimal web.xml ........................................................................... 5
2.3. Create a minimal faces-config.xml ............................................................... 5
2.4. Create Your JSF Markup ............................................................................ 6
2.5. Run the application ..................................................................................... 6
II. Configuration ................................................................................................................. 7
3. Deploying Your JSF Applications ........................................................................ 9
3.1. The JSF Deployer ...................................................................................... 9
3.2. How the JSF Deployer Recognizes your JSF Application ............................... 9
3.3. Auto-adding of the JSF FacesServlet ......................................................... 10
3.4. Using a Non-standard FacesServlet ........................................................... 10
3.5. Bundling JSF Inside Your WAR ................................................................. 11
3.6. Changing the JSF Configuration for your WAR ........................................... 11
3.7. Adding a New JSF Configuration ............................................................... 12
3.8. Activating a New JSF Configuration ........................................................... 12
4. JSF and Serialization ......................................................................................... 15
4.1. Using JBoss Serialization .......................................................................... 15
III. Reference .................................................................................................................. 17
5. Reference ........................................................................................................... 19
5.1. JSF Standard Context Params .................................................................. 19
5.2. Mojarra Context Params ............................................................................ 22
5.3. JBoss JSF Context Params ....................................................................... 27

iii
iv
Part I. Introduction and Quick Start
Chapter 1.

Introduction
In the past, using a JEE application server meant using the JSF implementation that ships with
it. However, there are subtle differences between JSF implementations. Applications written for
Mojarra don't always run well on MyFaces. There are sometimes backward compatibility issues
between JSF specification levels. An application written for JSF 1.2 won't always run on JSF 2.0.

JBoss AS6 is designed for maximum flexibility in JSF deployments. With JBoss AS6, you can use
the default JSF implementation, use a secondary JSF implementation, or bundle your own JSF
implementation with the WAR. You can have different applications in the same server instance that
use different implementations. Also, you can create your own JSF Configurations that include a
JSF implementation, extra libraries, and configuration parameters. Then assign the configuration
to one or more applications.

In this guide, we'll step through a simple JSF example. Then we will go through all the powerful
deployment options for JSF applications.

3
4
Chapter 2.

Quick Start
In this chapter, we demonstrate the world's simplest JSF "Hello World" application.

2.1. Create your WAR structure


Go to your JBOSS_HOME/server/default/deploy directory and create these two subdirectories:

• hellojsf.war

• hellojsf.war/WEB-INF

2.2. Create a minimal web.xml


This web.xml only needs the minimum declarations shown below. Place the file in /WEB-INF.

<?xml version="1.0"?>
<web-app>
</web-app>

Note
As shown, you don't necessarily need to declare a FacesServlet or mappings in
web.xml. If you leave this out, JBoss AS6 will add it automatically with default
mappings as demonstrated at the end of this chapter.

2.3. Create a minimal faces-config.xml


This faces-config.xml only needs the minimum declarations shown below. Place the file in
/WEB-INF.

<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/
web-facesconfig_2_0.xsd"
version="2.0">

</faces-config>

5
Chapter 2. Quick Start

The faces-config.xml is only there to signal to JBoss AS that this is a JSF application. There are
many other ways that JBoss AS6 could recognize this as a JSF application. This is explained in
detail in chapter 3.

2.4. Create Your JSF Markup


We will use a single facelet. Create the file index.xhtml and put it in your deploy/hellojsf.war
directory.

We use a little JSF2/EL 2.2 trick to avoid the need for a backing bean. We can grab the input
value directly from the request object using a parameterized EL expression.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">

<f:view>
<h:form id="form1">
<h:outputText value="Enter Your Name:"/>
<h:inputText id="name"/>
<h:commandButton value="Submit" />
</h:form>
<h:outputText rendered="#{not empty request.getParameter('form1:name')}"
value=" Hello #{request.getParameter('form1:name')}"/>
</f:view>

</html>

2.5. Run the application


Now we're done! We only needed three files and two of those were just placeholders.

Start JBoss AS6 and put any of the following URLs into your browswer:

• http://localhost:8080/hellojsf/index.jsf

• http://localhost:8080/hellojsf/index.faces

• http://localhost:8080/hellojsf/faces/index.xhtml

6
Part II. Configuration
Chapter 3.

Deploying Your JSF Applications


In this chapter, we cover all the deployment options for your JSF applications.

3.1. The JSF Deployer


JSF integration for JBoss AS6 has been re-written to take advantage of the JBoss deployer
architecture. So instead of having JSF tightly coupled to the Servlet container, it is now an
independent deployer that adds JSF to your WAR when needed.

The JSF Deployer is located in the deployers/jsf.deployer directory. By default, JBoss


AS6 ships with three JSF implementations located in the jsf.deployer/Mojarra-2.0,
jsf.deployer/MyFaces-2.0, and jsf.deployer/Mojarra-1.2 directories. These directories
contain JSF Configurations.

Note
A JSF Configuration is more than just the implementation jars. It can contain
supporting jars such as parsers and JSF component libraries. It also contains
initialization and configuration settings that are applied to your application when
the JSF Configuration is added to your WAR deployment.

Inside the jsf.deployer/META-INF directory you will find a file called jsf-integration-
deployer-jboss-beans.xml. You can use this file for advanced configuration of the deployer,
which we will describe in some of the sections that follow.

3.2. How the JSF Deployer Recognizes your JSF


Application
In past versions of JBoss AS, every web application had a JSF implementation and its supporting
jars placed on its classpath. In addition, every web application went through at least some of the
JSF initialization process - even when it didn't use JSF. With JBoss AS6, JSF jars are only added
to the classpath when needed.

When a web application is deployed, the JSF Deployer determines if it is a JSF application. It
recognizes a web application if any of the following are true:

• A FacesServlet is declared in WEB-INF/web.xml or a web-fragment.xml

• A faces-config.xml file is found in WEB-INF

• A faces-config.xml file is found in META-INF of some jar in WEB-INF/lib

• A *.faces-config.xml file is found in META-INF of some jar in WEB-INF/lib

9
Chapter 3. Deploying Your JSF...

• The javax.faces.CONFIG_FILES context param is declared in WEB-INF/web.xml or a web-


fragment.xml

• The org.jboss.jbossfaces.JSF_CONFIG_NAME context param is declared in WEB-INF/


web.xml or a web-fragment.xml

• "alwaysAddJSF" is set to true in jsf-integration-deployer-jboss-beans.xml

3.3. Auto-adding of the JSF FacesServlet


If the JSF Deployer determines that a WAR is a JSF application, but
javax.faces.webapp.FacesServlet is not already declared as a servlet, the deployer will add
an instance of this servlet for you.

If it adds the FacesServlet, it will also add the following mappings for it:

• /faces/*

• *.jsf

• *.faces

Note
MyFaces and pre-2.0 versions of Mojarra still assume that you will declare a
FacesServlet in your web.xml. So if you are using those versions you can not
depend on auto-adding.

3.4. Using a Non-standard FacesServlet


Though it is not recommended, some applications use a non-standard servlet to control JSF
services. You can configure the JSF Deployer to recognize a non-standard servlet as a
JSF application. Edit the file jsf.deployer/META-INF/jsf-integration-deployer-jboss-
beans.xml and add your servlet to the facesServlets property.

In this example, we add org.foo.MyWrapperFacesServlet. When an application is deployed


with this servlet it will be recognized as a JSF application.

<bean name="JSFImplManagementDeployer">

<!--
* Specify the servlet classes that signal this deployer to add JSF to a WAR.
-->
<property name="facesServlets">

10
Bundling JSF Inside Your WAR

<collection elementClass="java.lang.String">
<value>javax.faces.webapp.FacesServlet</value>
<value>org.foo.MyWrapperFacesServlet</value>
</collection>
</property>

3.5. Bundling JSF Inside Your WAR


Some containers such as Tomcat 6 require you to bundle a JSF implementation in the WEB-INF/
lib directory of your WAR. If you would like to use such a WAR with JBoss AS6 then you can
signal the JSF Deployer to ignore your WAR and let it use the bundled JSF version.

To do that, just specify the WAR_BUNDLES_JSF context param in your web.xml file like this:

<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>

Note
This context-param was available in earlier versions of JBoss AS. However, it
only worked when bundling MyFaces and when using the default classloader
configuration. Now in AS6 you can use this context-param any time you want to
bundle your own JSF impl.

3.6. Changing the JSF Configuration for your WAR


JBoss AS ships with three JSF Implementations, Mojarra 1.2, Mojarra 2.0, and MyFaces 2.0. By
default, JSF applications will use Mojarra 2.0. While most JSF 1.2 applications will run on JSF 2.0
without changes, there are a few rare instances where this is not the case. Also, when migrating
to JBoss AS6 from AS5, you might want to first use the older JSF implementation and "ease into"
the world of JSF 2.0 later.

If you look at the deployers/jsf.deployer directory you will see the JSF configurations that
ship with JBoss AS6. To tell your application to use one of these JSF configurations, add this to
your web.xml:

<context-param>
<param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>

11
Chapter 3. Deploying Your JSF...

<param-value>Mojarra-1.2</param-value>
</context-param>

3.7. Adding a New JSF Configuration


A new JSF Configuration is useful when you want to add a new JSF implementation to JBoss AS
or you just want to enhance an implementation with extra jars such as component libraries. This
can save you from bundling the same jars over and over in your WARs.

It's also useful for testing the same application against different JSF implementations, library
versions, and configurations. You can create a JSF Configuration and then apply it to your WAR
with a a simple context param.

A JSF Configuration consists of some jars and a special web.xml file. When a JSF Configuration
is added to a WAR by the JSF Deployer, the jars are added to the classpath and the elements
in the web.xml file are activated. To add your own JSF Confguration, just create the directory
structure below. This is usually done in the jsf.deployer directory:

• jsf.deployer/MyJSFConfig/jsf-libs

• jsf.deployer/MyJSFConfig/META-INF

Place your jar files in /jsf-libs and place your web.xml in /META-INF. When your JSF
Configuration is activated for a WAR, all jars in the jsf-libs directory will be added to the classpath.

The elements in your special META-INF/web.xml file will also be added to your WAR. This can
help you configure the JSF implementation and component libraries. However, note that only a
few web.xml elements are allowed in this file. These elements are servlet, servlet-mapping, filter,
filter-mapping, listener, and context-param. All other web.xml elements are currently ignored, but
we may support more in the future.

3.8. Activating a New JSF Configuration


To allow the JSF Deployer to recognize your JSF Configuration, you will need to edit deployers/
jsf.deployer/META-INF/jsf-integration-deployer-jboss-beans.xml:

<property name="jsfConfigurations">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry>
<key>Mojarra-1.2</key>
<value>${jboss.server.home.url}deployers/jsf.deployer/Mojarra-1.2</value>
</entry>
<entry>
<key>Mojarra-2.0</key>

12
Activating a New JSF Configuration

<value>${jboss.server.home.url}deployers/jsf.deployer/Mojarra-2.0</value>
</entry>

<entry>
<key>MyJSFConfig</key>
<value>${jboss.server.home.url}deployers/jsf.deployer/MyJSFConfig</value>
</entry>
</map>
</property>

<bean name="JSFUrlIntegrationDeployer-MyJSFConfig">
<property name="JSFImplName">
<value>MyJSFConfig</value>
</property>
<property name="JSFImplManagementDeployer">
<inject bean="JSFImplManagementDeployer"/>
</property>
</bean>

13
14
Chapter 4.

JSF and Serialization


Serialization can be one of the most costly operations in a JSF application. This is especially true
when using client side state-saving, but it can also come into play when you use server-side state
saving as well.

4.1. Using JBoss Serialization


JBoss AS6 ships with a serialization provider that allows you to use the JBossSerialization
project with Mojarra 1.2 and 2.0. While your results will vary, using JBossSerialization may boost
performance, especially with older versions of Java.

To enable JBossSerialization in Mojarra JSF, set the following context parameter in your web.xml
file.

<context-param>
<param-name>com.sun.faces.serializationProvider</param-name>
<param-value>org.jboss.web.jsf.integration.serialization.JBossSerializationProvider</param-
value>
</context-param>

15
16
Part III. Reference
Chapter 5.

Reference
5.1. JSF Standard Context Params
Table 5.1.

Context Param JSF Description Default


Spec Value
javax.faces.CONFIG_FILES 1.2 Comma-delimited list of null
and faces config files.
2.0
javax.faces.DEFAULT_SUFFIX 1.2 Change the default suffix for .jsp
and JSP views.
2.0
javax.faces.LIFECYCLE_ID 1.2 ID for alternate Lifecycle null
and implementations.
2.0
javax.faces.STATE_SAVING_METHOD 1.2 "server" or "client" server
and
2.0
javax.faces.DATETIMECONVERTER 2.0 Controls if false
_DEFAULT_TIMEZONE_IS DateTimeConverter
_SYSTEM_TIMEZONE instances use the system
timezone (if true) or GMT (if
false).
javax.faces.DATETIMECONVERTER 2.0 Controls if false
_DEFAULT_TIMEZONE_IS DateTimeConverter
_SYSTEM_TIMEZONE instances use the system
timezone (if true) or GMT (if
false).
javax.faces.DISABLE_FACELET 2.0 Disables the built-in Facelet false
_JSF_VIEWHANDLER ViewHandler. Useful for
applications that use legacy
Facelets implementation.
javax.faces.FACELETS_LIBRARIES 2.0 Semicolon-separated list of null
paths to Facelet tag
libraries.
facelets.LIBRARIES 2.0 Semicolon-separated list null
of paths to Facelet
tag libraries. Used
for backward-compatibility

19
Chapter 5. Reference

Context Param JSF Description Default


Spec Value
with legacy Facelets
implementation.
javax.faces.FACELETS_BUFFER_SIZE 2.0 The buffer size set on the -1 (no
response. assigned
buffer size)
facelets.BUFFER_SIZE 2.0 The buffer size set -1 (no
on the response. Used assigned
for backward-compatibility buffer size)
with legacy Facelets
implementation.
javax.faces.DECORATORS 2.0 Semicolon-delimited list null
of TagDecorator
implementations. See
javadoc for javax.faces.view
.facelets.TagDecorator.
facelets.DECORATORS 2.0 Semicolon-delimited list null
of TagDecorator
implementations. Used
for backward-compatibility
with legacy Facelets
implementation.
javax.faces.FACELETS 2.0 Time in seconds that implementation-
_REFRESH_PERIOD facelets should be checked specific
for changes since last
request. A value of -1
disables refresh checking.
facelets.REFRESH_PERIOD 2.0 Time in seconds that implementation-
facelets should be checked specific
for changes since last
request. A value of -1
disables refresh checking.
Used for backward-
compatibility with legacy
Facelets implementation.
javax.faces.FACELETS 2.0 An implementation of null
_RESOURCE_RESOLVER javax.faces .view.facelets
.ResourceResolver. See
javadoc for details.
facelets.RESOURCE_RESOLVER 2.0 An implementation of null
javax.faces .view.facelets

20
JSF Standard Context Params

Context Param JSF Description Default


Spec Value
.ResourceResolver. See
javadoc for details. Used
for backward-compatibility
with legacy Facelets
implementation.
javax.faces.FACELETS_SKIP 2.0 If true, strip XML comments false
_COMMENTS out of Facelets before
delivering to the client.
facelets.SKIP_COMMENTS 2.0 If true, strip XML comments false
out of Facelets before
delivering to the client. Used
for backward-compatibility
with legacy Facelets
implementation.
javax.faces.FACELETS_SUFFIX 2.0 Set the suffix for Facelet .xhtml
xhtml files.
facelets.SUFFIX 2.0 Set the suffix for .xhtml
Facelet xhtml files. Used
for backward-compatibility
with legacy Facelets
implementation.
javax.faces.FACELETS_VIEW_MAPPINGS 2.0 Semicolon-separated list of null
Facelet files that don't use
the default facelets suffix.
facelets.VIEW_MAPPINGS 2.0 Semicolon-separated list of null
Facelet files that don't
use the default facelets
suffix. Used for backward-
compatibility with legacy
Facelets implementation.
javax.faces.FULL_STATE 2.0 Semicolon-separated list of null
_SAVING_VIEW_IDS view IDs that must save
state using the JSF 1.2-style
state saving.
javax.faces.INTERPRET_EMPTY 2.0 If true, consider empty false
_STRING_SUBMITTED_VALUES UIInput values to be null
_AS_NULL instead of empty string.
javax.faces.PARTIAL_STATE_SAVING 2.0 If true, use the JSF2 partial false, if
state saving for views. WEB-INF/
faces-

21
Chapter 5. Reference

Context Param JSF Description Default


Spec Value
config.xml
does not
declare JSF
2.0 schema.
true,
otherwise
javax.faces.PROJECT_STAGE 2.0 Set the project stage to Production
"Development", "UnitTest",
"SystemTest", or
"Production".
javax.faces.VALIDATE_EMPTY_FIELDS 2.0 If "true", validate null and auto
empty values. If "auto"
validate when JSR-303
Bean Validation is enabled
(in AS6 it is enabled by
default).
javax.faces.validator.DISABLE 2.0 If "true", disable JSR-303 false
_DEFAULT_BEAN_VALIDATOR Bean Validation.

5.2. Mojarra Context Params


These context params are only valid when using Mojarra JSF.

Table 5.2.

Context Param Impl Description Default Value


Ver
com.sun.faces. 1.2 For server state-saving, 15
numberOfViewsInSession and how many views, per
2.0 logical view, can be
stored in the session
before oldest is removed?
com.sun.faces.numberOfLogicalViews 1.2 For server state-saving, 15
and how many logical views
2.0 are allowed before oldest
is removed?
com.sun.faces.preferXHTML 1.2 Set xhtml as the content false
and type for browsers that
2.0 support it.
com.sun.faces.compressViewState false

22
Mojarra Context Params

Context Param Impl Description Default Value


Ver
1.2 Compress the view after
and serialization but before
2.0 encoding.
com.sun.faces.disableVersionTracking 1.2 If true, don't allow JSF false
and 1.1 implementations of
2.0 certain interfaces.
com.sun.faces.sendPoweredByHeader 1.2 If true, send a header with true
and the JSF spec level.
2.0
com.sun.faces.verifyObjects 1.2 If true, verify all false
and JSF artifacts (such as
2.0 managed beans) can
be instantiated during
initialization.
com.sun.faces.validateXml 1.2 If true, perform XML false
and validation on config files.
2.0
com.sun.faces.displayConfiguration 1.2 If true, log the values of all false
and Mojarra and JSF context
2.0 params.
com.sun.faces.injectionProvider 1.2 Replace the default org.jboss.web
and InjectionProvider .jsf.integration
2.0 implementation. By .injection
default this is set by JBoss .JBossDelegatingInjectionProvider
AS6.
com.sun.faces.injectionProvider 1.2 Replace the default null
and SerializationProvider
2.0 implementation.
com.sun.faces.responseBufferSize 1.2 Buffer size for writing 4096
and most generated content.
2.0
com.sun.faces. 1.2 Buffer size for writing 8192
clientStateWriteBufferSize and client state.
2.0
com.sun.faces.compressJavaScript 1.2 Remove whitespace true
and from javascript used
2.0 in standard JSF
components.

23
Chapter 5. Reference

Context Param Impl Description Default Value


Ver
com.sun.faces.externalizeJavaScript 1.2 Allow browsers to false
and cache javascript used
2.0 in standard JSF
components.
com.sun.faces.enableJSStyleHiding 1.2 Hide javascript from older false
and browser implementations.
2.0
com.sun.faces.writeStateAtFormEnd 1.2 Controls if view state is true
and written after opening a
2.0 form tag (false) or closing
a form tag (true).
com.sun.faces. 1.2 If false, examine true
enableLazyBeanValidation and managed beans at
2.0 startup. Otherwise,
validate when referenced/
created.
com.sun.faces. 1.2 Preserve JSF 1.1 false
enabledLoadBundle11Compatibility and behavior of f:loadBundle.
2.0 See issue here. [https:/
/
javaserverfaces.dev.java.net/
issues/
show_bug.cgi?id=577]
com.sun.faces.clientStateTimeout 1.2 Time in seconds null
and that client state is
2.0 considered valid. If a
request is received
after timeout expired,
ViewExpiredException is
thrown.
com.sun.faces.serializeServerState 1.2 If true, serialize server- false
and side component state.
2.0
com.sun.faces. 1.2 If false, don't render id true
enableViewStateIdRendering and attribute on
2.0 javax.faces.ViewState
hidden field. See issue
here. [https://
javaserverfaces.dev.java.net/

24
Mojarra Context Params

Context Param Impl Description Default Value


Ver
issues/
show_bug.cgi?id=433]
com.sun.faces. 1.2 If false, don't allow true
enableScriptsInAttributeValues and attribute values with
2.0 "javascirpt:" or "script:".
com.sun.faces.disableUnicodeEscaping 1.2 "false", "true", or "auto". false
and If "auto", escaping
2.0 depends on response
encoding. See issue
here. [https://
javaserverfaces.dev.java.net/
issues/
show_bug.cgi?id=751]
com.sun.faces.developmentMode 1.2 If true, reload Groovy and false
faces-config files when
edited.
com.sun.faces. 1.2 If false, don't create true
enableMultiThreadedStartup worker threads at startup.
com.sun.faces.enableThreading 2.0 If false, don't create false
worker threads at startup.
com.sun.faces.resourceBufferSize 2.0 Read buffer size, in 2048
bytes, used by the
default ResourceHandler
implementation.
com.sun.faces.defaultResourceMaxAge 2.0 Time in milliseconds that 604800
a resource from the
ResourceHandler will be
cached via an "Expires"
response header. No
caching if ProjectStage is
"Development".
com.sun.faces. 2.0 Frequency in minutes 5
resourceUpdateCheckPeriod to check for changes
to webapp artifacts that
contain resources. 0
means never check
for changes. -1 means
always perform a new
lookup when finding
resources.

25
Chapter 5. Reference

Context Param Impl Description Default Value


Ver
com.sun.faces.compressableMimeTypes 2.0 Comma-seperated list null
of compressable mime
types. No compression
if ProjectStage is
"Development"
com.sun.faces.expressionFactory 2.0 Expression factory com.sun.el
implementation class. .ExpressionFactoryImpl
com.sun.faces.duplicateJARPattern 1.2 Regular expression to ^tmp\d+(\S*\.jar)
and determine if two URLs
2.0 point to the same jar. Set
by JBoss JSF Deployer.
com.sun.faces.faceletFactory 2.0 Set the FaceletFactory null
impl class.
com.sun.faces.enableHtmlTagLibValidator
2.0 Enable validation of false
standard Html TagLibs.
com.sun.faces.enableCoreTagLibValidator
2.0 Enable validation of false
standard Core TagLibs.
com.sun.faces. 2.0 If true, allow EL Coercion false
registerConverterPropertyEditors to use JSF Custom
converters.
com.sun.faces.enableGroovyScripting 2.0 If true, allow Groovy. false
com.sun.faces. 2.0 If true, generate random true
generateUniqueServerStateIds server state Ids. If false,
create Ids sequentially.
com.sun.faces. 2.0 If false, don't use true
autoCompleteOffOnViewState autocomplete="off" when
saving view state.
com.sun.faces.allowTextChildren 2.0 If true, allow children false
of h:inputText and
h:outputText to be
rendered. In 1.2,
they would always be
rendered before the value
of tag. In 2.0, they will not
be rendered at all unless
this flag is set.

26
JBoss JSF Context Params

5.3. JBoss JSF Context Params


These context params are explained more in Chapter 3.

Table 5.3.

Context Param Description Default


Value
org.jboss.jbossfaces.JSF_CONFIG_NAME The name of the JSF Mojarra-2.0
Configuration to use for
this WAR.
org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL If true, allow WAR to use false
the JSF implementation
found in WEB-INF/lib.

27
28

You might also like