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:
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>
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>