UI-Component Sets
Project Documentation

Summary

Below is the list of available web context parameters supported:

Web Context Parameters

Artifact Id: myfaces-api

Name Default Value Expected Values Since Description Source Class
javax.faces.STATE_SAVING_METHOD server server,client 1.1 Define the state method to be used. There are two different options defined by the specification: "client" and "server" state.

When "client" state is configured, all state information required to create the tree is embedded within the data rendered to the client. Note that because data received from a remote client must always be treated as "tainted", care must be taken when using such data. Some StateManager implementations may use encryption to ensure that clients cannot modify the data, and that the data received on postback is therefore trustworthy.

When "server" state is configured, the data is saved somewhere "on the back end", and (at most) a token is embedded in the data rendered to the user.

javax.faces.application.StateManager
javax.faces.DEFAULT_SUFFIX .jsp 1.1 Indicate the default suffix to derive the file URI if extension mapping is used. javax.faces.application.ViewHandler
javax.faces.CONFIG_FILES 1.1 Comma separated list of URIs of (additional) faces config files. (e.g. /WEB-INF/my-config.xml)See JSF 1.0 PRD2, 10.3.2 Attention: You do not need to put /WEB-INF/faces-config.xml in here. javax.faces.webapp.FacesServlet
javax.faces.LIFECYCLE_ID 1.1 Identify the Lifecycle instance to be used. javax.faces.webapp.FacesServlet
org.apache.myfaces.ERROR_HANDLING true true,false 1.2.4 Indicate if myfaces is responsible to handle errors. See http://wiki.apache.org/myfaces/Handling_Server_Errors for details. javax.faces.webapp.FacesServlet
org.apache.myfaces.ERROR_HANDLER 1.2.4 If you want to choose a different class for handling the exception.

The error-handler needs to include the following methods:

  • handleException(FacesContext fc, Exception ex)
  • handleExceptionList(FacesContext facesContext, List exceptionList)
  • handleThrowable(FacesContext facesContext, Throwable ex)
javax.faces.webapp.FacesServlet
org.apache.myfaces.ERROR_TEMPLATE_RESOURCE META-INF/rsc/myfaces-dev-error.xml 1.2.4 javax.faces.webapp._ErrorPageWriter
org.apache.myfaces.DEBUG_TEMPLATE_RESOURCE META-INF/rsc/myfaces-dev-debug.xml 1.2.4 javax.faces.webapp._ErrorPageWriter

Artifact Id: myfaces-impl

Name Default Value Expected Values Since Description Source Class
org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION 20 1.1 Only applicable if state saving method is "server" (= default). Defines the amount (default = 20) of the latest views are stored in session. org.apache.myfaces.application.jsp.JspStateManagerImpl
org.apache.myfaces.SERIALIZE_STATE_IN_SESSION true 1.1 Only applicable if state saving method is "server" (= default). If true (default) the state will be serialized to a byte stream before it is written to the session. If false the state will not be serialized to a byte stream. org.apache.myfaces.application.jsp.JspStateManagerImpl
org.apache.myfaces.COMPRESS_STATE_IN_SESSION true 1.1 Only applicable if state saving method is "server" (= default) and if org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (= default). If true (default) the serialized state will be compressed before it is written to the session. If false the state will not be compressed. org.apache.myfaces.application.jsp.JspStateManagerImpl
org.apache.myfaces.CACHE_OLD_VIEWS_IN_SESSION_MODE off off, no, hard-soft, soft, soft-weak, weak 1.2.5 Define the way of handle old view references(views removed from session), making possible to store it in a cache, so the state manager first try to get the view from the session. If is it not found and soft or weak ReferenceMap is used, it try to get from it.

Only applicable if state saving method is "server" (= default).

The gc is responsible for remove the views, according to the rules used for soft, weak or phantom references. If a key in soft and weak mode is garbage collected, its values are purged.

By default no cache is used, so views removed from session became phantom references.

  • off, no: default, no cache is used
  • hard-soft: use an ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.SOFT)
  • soft: use an ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.SOFT, true)
  • soft-weak: use an ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.WEAK, true)
  • weak: use an ReferenceMap(AbstractReferenceMap.WEAK, AbstractReferenceMap.WEAK, true)
org.apache.myfaces.application.jsp.JspStateManagerImpl
org.apache.myfaces.config.annotation.LifecycleProvider 1.1 org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory
org.apache.myfaces.EL_RESOLVER_COMPARATOR 1.2.10, 2.0.2 org.apache.myfaces.el.unified.ResolverBuilderBase
org.apache.myfaces.PRETTY_HTML true true,false 1.1 If true, rendered HTML code will be formatted, so that it is "human readable". i.e. additional line separators and whitespace will be written, that do not influence the HTML code. Default: "true" org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.ALLOW_JAVASCRIPT true true,false 1.1 This parameter tells MyFaces if javascript code should be allowed in the rendered HTML output. If javascript is allowed, command_link anchors will have javascript code that submits the corresponding form. If javascript is not allowed, the state saving info and nested parameters ill be added as url parameters. Default: "true" org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.DETECT_JAVASCRIPT false true,false 1.1 org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.AUTO_SCROLL false true,false 1.1 If true, a javascript function will be rendered that is able to restore the former vertical scroll on every request. Convenient feature if you have pages with long lists and you do not want the browser page to always jump to the top if you trigger a link or button action that stays on the same page. Default: "false" org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.ADD_RESOURCE_CLASS org.apache.myfaces.renderkit.html.util.DefaultAddResource 1.1 Tomahawk specific: A class implementing the org.apache.myfaces.shared_impl.renderkit.html.util.AddResource interface. It is responsible to place scripts and css on the right position in your HTML document. Default: "org.apache.myfaces.shared_impl.renderkit.html.util.DefaultAddResource" Follow the description on the MyFaces-Wiki-Performance page to enable StreamingAddResource instead of DefaultAddResource if you want to gain performance. org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.CHECK_EXTENSIONS_FILTER true true,false 1.1 Tomahawk specific: A very common problem in configuring MyFaces-web-applications is that the Extensions-Filter is not configured at all or improperly configured. This parameter will check for a properly configured Extensions-Filter if it is needed by the web-app. In most cases this check will work just fine, there might be cases where an internal forward will bypass the Extensions-Filter and the check will not work. If this is the case, you can disable the check by setting this parameter to false. org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS true true,false 1.1 org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.CONFIG_REFRESH_PERIOD 2 1.1 org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.VIEWSTATE_JAVASCRIPT false true,false 1.1 org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.RENDER_VIEWSTATE_ID true true,false 1.1 org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.STRICT_XHTML_LINKS true true,false 1.1 org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON false true,false 1.2.3 This param renders the clear javascript on button necessary only for compatibility with hidden fields feature of myfaces. This is done because jsf ri does not render javascript on onclick method for button, so myfaces should do this. org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS false true,false 1.2.9 This param renders hidden fields at the end of h:form for link params when h:commandLink + f:param is used, instead use javascript to create them. Set this param to true also enables org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON automatically to ensure consistency. This feature is required to support Windows Mobile 6, because in this environment, document.createElement() and form.appendChild() javascript methods are not supported. org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE false true,false 1.1 Add a code that save the form before submit using a link (call to window.external.AutoCompleteSaveForm(form) ). It's a bug on IE. org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.DELEGATE_FACES_SERVLET 1.2.7 org.apache.myfaces.shared_impl.config.MyfacesConfig
org.apache.myfaces.USE_ENCRYPTION true true,false 1.1 Indicate if the view state is encrypted or not. By default, encryption is enabled. org.apache.myfaces.shared_impl.util.StateUtils
org.apache.myfaces.SECRET 1.1 Defines the secret (Base64 encoded) used to initialize the secret key for encryption algorithm. See MyFaces wiki/web site documentation for instructions on how to configure an application for different encryption strengths. org.apache.myfaces.shared_impl.util.StateUtils
org.apache.myfaces.ALGORITHM DES 1.1 Indicate the encryption algorithm used for encrypt the view state. org.apache.myfaces.shared_impl.util.StateUtils
org.apache.myfaces.SECRET.CACHE 1.1 If is set to "false", the secret key used for encryption algorithm is not cached. This is used when the returned SecretKey for encryption algorithm is not thread safe. org.apache.myfaces.shared_impl.util.StateUtils
org.apache.myfaces.ALGORITHM.IV 1.1 Defines the initialization vector (Base64 encoded) used for the encryption algorithm org.apache.myfaces.shared_impl.util.StateUtils
org.apache.myfaces.ALGORITHM.PARAMETERS ECB/PKCS5Padding 1.1 Defines the default mode and padding used for the encryption algorithm org.apache.myfaces.shared_impl.util.StateUtils
org.apache.myfaces.SERIAL_FACTORY 1.1 Defines the factory class name using for serialize/deserialize the view state returned by state manager into a byte array. The expected class must implement org.apache.myfaces.shared_impl.util.serial.SerialFactory interface. org.apache.myfaces.shared_impl.util.StateUtils
org.apache.myfaces.COMPRESS_STATE_IN_CLIENT false true,false 1.1 Indicate if the view state should be compressed before encrypted(optional) and encoded org.apache.myfaces.shared_impl.util.StateUtils
org.apache.myfaces.MAC_ALGORITHM HmacSHA1 Indicate the algorithm used to calculate the Message Authentication Code that is added to the view state. org.apache.myfaces.shared_impl.util.StateUtils
org.apache.myfaces.MAC_SECRET Define the initialization code that are used to initialize the secret key used on the Message Authentication Code algorithm org.apache.myfaces.shared_impl.util.StateUtils
org.apache.myfaces.MAC_SECRET.CACHE If is set to "false", the secret key used for MAC algorithm is not cached. This is used when the returned SecretKey for mac algorithm is not thread safe. org.apache.myfaces.shared_impl.util.StateUtils
org.apache.myfaces.EXPRESSION_FACTORY 1.2.7 This parameter specifies the ExpressionFactory implementation to use. org.apache.myfaces.webapp.AbstractFacesInitializer