Configuring trace support in a JSF application
When you add trace support to your JSF application, the
jsf-trace.jar file that is added to your project can be configured
in the web.xml file.
Before you begin
Procedure
- In Enterprise Explorer, expand your Web project and then expand WebContent > WEB-INF.
- Double click web.xml to open it in the editor.
- Configure the context parameters and then save the file.
Table 1. JSF Trace context parameters Parameter name Default value Description com.ibm.faces.trace.ENABLED true Enables or disables trace collection and communication. Tip: The tracing function will negatively impact application performance. When you have completed tracing, debugging, and testing your application and you are ready to deploy your application, disable the tracing function. To disable tracing support you can remove jsf-trace.jar from your Web project or modify set the context parameter com.ibm.faces.trace.ENABLED value, in web.xml to false. For more information, refer to Removing trace support from a JSF application.com.ibm.faces.trace.HOST 127.0.0.1 IP address or host name of the machine where your IDE runs. Your IDE and application can run on different machines and still communicate with each other; however, firewalls can block such communication. com.ibm.faces.trace.PORT 4444 IP port on which you will establish communication with the IDE. This setting must match the JSF Trace view setting in the IDE. Refer to Configuring Trace view preferences com.ibm.faces.trace.MAX_NESTING 3 Specifies the level to which properties of scoped objects are resolved. Important: The larger this value, the longer it will take to collect information, pass it to the IDE, and then to present in the view.com.ibm.faces.trace.IGNORE There is no default value.
The recommended value is com.ibm.,com.sun.,javax.,org.,/
Note: The slash at the end is for previous JSF implementations that keep view states in session under /jspname keys.Note: If your own objects start with com.ibm. you may want to relax the restriction by replacing com.ibm. with com.ibm.faces.,com.ibm.ws.,com.ibm.websphere.Comma-separated list of strings. If scoped object's name started with any of the strings in the list, such object will be ignored -- information about it won't be collected and won't be transmitted to the JSF Trace view. When JSF application runs, there is a fairly large number of objects in various scopes that do not belong to the actual application, but rather to the JSF implementation or the server container. Those objects rarely change and would rarely be interesting to the user. It is recommended to exclude them from tracing data to improve performance of collection and network traffic. com.ibm.faces.trace.IGNORE_APPLICATION_SCOPE false When the value is set to true, the trace function excludes all application scoped objects from the trace. This parameter is used for improving performance. The less information there is to collect, the faster tracing will work. com.ibm.faces.trace.IGNORE_SESSION_SCOPE false When the value is set to true, the trace function excludes all session scoped objects from the trace. This parameter is used for improving performance. The less information there is to collect, the faster tracing will work. com.ibm.faces.trace.IGNORE_REQUEST_SCOPE false When the value is set to true, the trace function excludes all request scoped objects from the trace. This parameter is used for improving performance. The less information there is to collect, the faster tracing will work. com.ibm.faces.trace.IGNORE_VIEW_ATTRIBUTES false When the value is set to true, the trace function excludes all view attributes from the trace. This parameter is used for improving performance. The less information there is to collect, the faster tracing will work. com.ibm.faces.trace.IGNORE_VIEW_TREE false When the value is set to true, the trace function excludes all view tree components from the trace. This parameter is used for improving performance. The less information there is to collect, the faster tracing will work. com.ibm.faces.trace.IGNORE_COMPONENT_VALUES false When the value is set to true, the trace function does not query a component for the component value. Important: Querying component values can have unexpected consequences because the value binding would be evaluated when normally the evaluation would not be done during the JSF lifecycle of the application. A managed bean may be created.com.ibm.faces.trace.TRACE_UIDATA false When the value is set to true, tracing of UIData components in a tree will iterate over the data model and will collect information about components in each row, up to a maximum number of rows.
When the value is set to false, tracing of UIData components includes only one instance of each component inside UIData.
com.ibm.faces.trace.MAX_UIDATA_ROWS 10 When com.ibm.faces.trace.TRACE_UIDATA is set to true, this parameter limits the number of UIData rows included in the trace. Important: The larger this value, the longer it will take to collect information, pass it to the IDE, and then to present in the view.
Feedback