JViews JSF configuration at JViews Framework level

Required settings

The standard configuration needed by a JSF application in the web.xml of your application server is shown in the following code:
<servlet>
   <servlet-name>JSF Servlet</servlet-name>
   <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
   <load-on-startup> 1 </load-on-startup>
</servlet>
<servlet-mapping>
   <servlet-name>JSF Servlet</servlet-name>
   <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
The JViews JSF Framework needs two additional settings in order to execute correctly, namely:
  • JViews Controller Servlet
The JViews Controller Servlet is in charge of loading the various resources used by the JViews JSF Framework implementation like JavaScriptâ„¢ libraries, images and the like. But more importantly it provides clients with the latest state of their views capabilities as well as their dynamically generated images.
You must declare and map the JViews Controller Servlet. To do this, use the following code:
<servlet>
   <servlet-name>Controller</servlet-name>
   <servlet-class>ilog.views.faces.IlvFacesController</servlet-class>
   <load-on-startup> 1 </load-on-startup>
</servlet>
<servlet-mapping>
   <servlet-name>Controller</servlet-name>
   <url-pattern>/_contr/*</url-pattern>
</servlet-mapping>
  • ilog.views.faces.CONTROLLER_PATH
This setting provides the users with the flexibility of defining a custom <url-pattern> for the JViews Controller Servlet that will be appropriately communicated to the JViews JSF Framework so that proper execution takes place.
You must set the ilog.views.faces.CONTROLLER_PATH context parameter which must match the content of the <url-pattern> of the JViews Controller Servlet without the wildcard part. For example, the following code would appear after the code for the JViews Controller Servlet.
<context-param>
  <param-name>ilog.views.faces.CONTROLLER_PATH</param-name>
  <param-value>/_contr</param-value>
</context-param>

Optional settings

The following optional setting is available in the JViews JSF Framework: ilog.views.faces.CONTENT_LENGTH_ENABLED .
The ilog.views.faces.CONTENT_LENGTH_ENABLED setting allows users to specify whether the underling servlet that is used to generate the client-side representation of the JViews JSF Components is interacting with the client in a buffered mode or not. More specifically, it enables the communication of the content length when the server responds to client requests. This provides more optimal interaction between the client and the server.
For more insights see javax.servlet.ServletResponse.setContentLength and related material on the Internet.
This setting is exposed through the context parameter facility and can be set as shown in the following code:
<context-param>
  <param-name>ilog.views.faces.CONTENT_LENGTH_ENABLED</param-name>
  <param-value>true</param-value>
</context-param>
Note
Although ilog.views.faces.CONTENT_LENGTH_ENABLED is optional, you are recommended always to set this setting to true .