JavaServer Faces context parameters

If you are using JavaServer Faces (JSF), you can add the following context parameters in the web.xml file.

The web.xml file must reside in the WEB-INF directory under the context of the hierarchy of directories that exist for a Web application. You can add the following context parameters to your web.xml file:

com.ibm.ws.jsf.commandLinkEscapeApostrophe [Fix Pack 29 or later]

The JavaServer Faces (JSF) CommandLink link component generates JavaScript code to perform a page submission. The presence of an apostrophe inside a parameter causes the generated JavaScript code to not be valid. To address this issue, set the com.ibm.ws.jsf.commandLinkEscapeApostrophe context parameter to true in the web.xml file. When the context parameter is set to true, an apostrophe inside a parameter is escaped. The following code shows how to set this context parameter:
<context-param>
  <description>Causes apostrophes inside the name or value of an f:param to be escaped in h:commandLink</description>
  <param-name>com.ibm.ws.jsf.commandLinkEscapeApostrophe</param-name>
  <param-value>true</param-value>
</context-param>

com.ibm.ws.jsf.ignoreAdditionalElements [Fix Pack 37 or later]

If you use a JSF library from another vendor, elements might exist in the faces-config.xml file that are not part of a standard JSF implementation. When the faces-config.xml file is parsed, warning messages might be added to the SystemOut.log file. These warning messages list elements in the faces-config.xml file that are not recognized. For example:
W com.ibm.ws.jsf.configuration.FacesConfigParser parseShared
FacesConfigParser.parseShared(): unable to locate :
[property-metadata]
W com.ibm.ws.jsf.configuration.FacesConfigParser parseShared
FacesConfigParser.parseShared(): unable to locate :
[component-metadata]
W com.ibm.ws.jsf.configuration.FacesConfigParser parseShared
FacesConfigParser.parseShared(): unable to locate : [group]
To ignore these warning messages, you can set the com.ibm.ws.jsf.ignoreAdditionalElements context parameter, which changes warning messages to trace statements. Thus, if you do not have tracing enabled, the warning messages are suppressed. To enable this behavior, set the com.ibm.ws.jsf.ignoreAdditionalElements context parameter to true in the web.xml file. The following code shows how to set this context parameter:
<context-param>
  <param-name>com.ibm.ws.jsf.ignoreAdditionalElements</param-name>
  <param-value>true</param-value>
</context-param>

com.ibm.ws.jsf.storeDynamicClientIds [Fix Pack 15 or later]

A duplicate client error might occur when you use the JSF implementation to dynamically add components to the tree. The error occurs because the JSF implementation generated client identifiers collide with cached client identifiers on a post back. To prevent the collision with existing client IDs, use the com.ibm.ws.jsf.storeDynamicClientIds context parameter to store the number that is used to generate new client IDs in the view between requests.

To prevent collision with existing client IDs, set the com.ibm.ws.jsf.storeDynamicClientIds context parameter to true in the web.xml file. The following code shows how to set this context parameter:
<context-param>
  <description>If this property is set to true, the number that is used to generate new client IDs is stored in the view so that it is saved between requests.
  </description> 
  <param-name>com.ibm.ws.jsf.storeDynamicClientIds</param-name>
  <param-value>true</param-value>
</context-param> 



Related tasks
Developing Web applications
Reference topic Reference topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 2:56:59 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=rweb_jsfcustomprops
File name: rweb_jsfcustomprops.html