Apache MyFaces Core 1.2

Implementation of the JavaServerâ„¢ Faces (JSF) 1.2 specification.

Source

Apache GitBox / GitHub

Downloads

MirrorsChecksumSignature
binary (tar.gz)myfaces-core-assembly-1.2.12-bin.tar.gzmyfaces-core-assembly-1.2.12-bin.tar.gz.md5myfaces-core-assembly-1.2.12-bin.tar.gz.asc
binary (zip)myfaces-core-assembly-1.2.12-bin.zipmyfaces-core-assembly-1.2.12-bin.zip.md5myfaces-core-assembly-1.2.12-bin.zip.asc
source (tar.gz)myfaces-core-assembly-1.2.12-src.tar.gzmyfaces-core-assembly-1.2.12-src.tar.gz.md5myfaces-core-assembly-1.2.12-src.tar.gz.asc
source (zip)myfaces-core-assembly-1.2.12-src.zipmyfaces-core-assembly-1.2.12-src.zip.md5myfaces-core-assembly-1.2.12-src.zip.asc

Release Verification

Steps for checksum & signature verification can be found here

Dependency

<dependency>
  <groupId>org.apache.myfaces.core</groupId>
  <artifactId>myfaces-api</artifactId>
  <version>1.2.12</version>
</dependency>
<dependency>
  <groupId>org.apache.myfaces.core</groupId>
  <artifactId>myfaces-impl</artifactId>
  <version>1.2.12</version>
</dependency>

Configuration

MyFaces core behavior can be customized, adding some web config params into your WEB-INF/web.xml or META-INF/web-fragment.xml file for your custom project in this way:

<context-param>
	<param-name>org.apache.myfaces.SOME_USEFUL_PARAM</param-name>
	<param-value>someValue</param-value>
</context-param>

:warning: The table below uses o.a.m as shortcut for org.apache.myfaces

NameSinceDefault valueExpected valuesDescription
javax.faces.STATE_SAVING_METHOD1.1serverserver,clientDefine 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.DEFAULT_SUFFIX1.1.jspIndicate the default suffix to derive the file URI if extension mapping is used.
javax.faces.CONFIG_FILES1.1Comma 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.LIFECYCLE_ID1.1Identify the Lifecycle instance to be used.
o.a.m.ERROR_HANDLING1.2.4truetrue,falseIndicate if myfaces is responsible to handle errors. See http://wiki.apache.org/myfaces/Handling_Server_Errors for details.
o.a.m.ERROR_HANDLER1.2.4If 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)
o.a.m.ERROR_TEMPLATE_RESOURCE1.2.4META-INF/rsc/myfaces-dev-error.xml
o.a.m.DEBUG_TEMPLATE_RESOURCE1.2.4META-INF/rsc/myfaces-dev-debug.xml
o.a.m.NUMBER_OF_VIEWS_IN_SESSION1.120Only applicable if state saving method is “server” (= default). Defines the amount (default = 20) of the latest views are stored in session.
o.a.m.SERIALIZE_STATE_IN_SESSION1.1trueOnly 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.
o.a.m.COMPRESS_STATE_IN_SESSION1.1trueOnly 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.
o.a.m.CACHE_OLD_VIEWS_IN_SESSION_MODE1.2.5offoff, no, hard-soft, soft, soft-weak, weakDefine 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)
o.a.m.config.annotation.LifecycleProvider1.1
o.a.m.EL_RESOLVER_COMPARATOR1.2.10, 2.0.2
o.a.m.PRETTY_HTML1.1truetrue,falseIf 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”
o.a.m.ALLOW_JAVASCRIPT1.1truetrue,falseThis 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”
o.a.m.DETECT_JAVASCRIPT1.1falsetrue,false
o.a.m.AUTO_SCROLL1.1falsetrue,falseIf 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”
o.a.m.READONLY_AS_DISABLED_FOR_SELECTS1.1truetrue,false
o.a.m.CONFIG_REFRESH_PERIOD1.12
o.a.m.VIEWSTATE_JAVASCRIPT1.1falsetrue,false
o.a.m.RENDER_VIEWSTATE_ID1.1truetrue,false
o.a.m.STRICT_XHTML_LINKS1.1truetrue,false
o.a.m.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON1.2.3falsetrue,falseThis 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.
o.a.m.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS1.2.9falsetrue,falseThis 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.
o.a.m.SAVE_FORM_SUBMIT_LINK_IE1.1falsetrue,falseAdd a code that save the form before submit using a link (call to window.external.AutoCompleteSaveForm(form) ). It's a bug on IE.
o.a.m.DELEGATE_FACES_SERVLET1.2.7
o.a.m.USE_ENCRYPTION1.1.8Indicate if the view state is encrypted or not
o.a.m.SECRET1.1Defines the secret (Base64 encoded) used to initialize the secret key for encryption algorithm
o.a.m.ALGORITHM1.1Indicate the encryption algorithm used for encrypt the view state
o.a.m.SECRET.CACHE1.1If is set to “false”, the secret key used for encryption algorithm is not cached
o.a.m.ALGORITHM.IV1.1Defines the initialization vector (Base64 encoded) used for the encryption algorithm
o.a.m.ALGORITHM.PARAMETERS1.1Defines the default mode and padding used for the encryption algorithm
o.a.m.SERIAL_FACTORY1.1Defines the factory class name using for serialize/deserialize the view state returned by state manager into a byte array
o.a.m.COMPRESS_STATE_IN_CLIENT1.1Indicate if the view state should be compressed before encrypted(optional) and encoded
o.a.m.MAC_ALGORITHM1.1Indicate the algorithm used to calculate the Message Authentication Code that is added to the view state
o.a.m.MAC_SECRET1.1Define the initialization code that are used to initialize the secret key used on the Message Authentication Code algorithm
o.a.m.MAC_SECRET.CACHE1.1If is set to “false”, the secret key used for MAC algorithm is not cached
o.a.m.EXPRESSION_FACTORY1.2.7This parameter specifies the ExpressionFactory implementation to use.