Configuring the JViews servlet

You must declare and configure the JViews servlet used by your Web application.
To declare and configure the JViews servlet:
  • Open the file web.xml located in the WebContent/WEB_INF folder and add the parts shown in bold in the following code example:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns="http://java.sun.com/xml/ns/javaee" 
      xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
      id="WebApp_ID" version="2.5">
      <display-name>jsf-hello-world</display-name>
    
      <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
      </welcome-file-list>  
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
      </servlet-mapping>
    
      <context-param>
        <param-name>ilog.views.faces.CONTROLLER_PATH</param-name>
        <param-value>/_contr</param-value>
      </context-param>
      <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>
    
    <context-param>
      <description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
    </context-param>
    <context-param>
        <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
        <param-value>resources.application</param-value>
    </context-param>
    <listener>
        <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>
    
    <!--
    This Web application uses JViews Maps features. When you deploy an application that includes this code, you need to be in possession of  a Rogue Wave JViews Maps Deployment license.
    -->
    <listener>
        <listener-class>ilog.views.util.servlet.DeploymentLicenseRequired_for_JViews_Maps_Deployment</listener-class>
    </listener>
    </web-app>
This is the JViews servlet that handles all image requests initiated by JViews clients through Web browsers.