Creating a JSF map view

To add a JSF map view:
  • Open the new index.jsp file located in the WebContent folder and add the code shown in bold in the following code example:
    <%@ page language="java" contentType="text/html;
    charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@ taglib prefix="f"
    uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h"
    uri="http://java.sun.com/jsf/html"%>
    <%@ taglib
    uri="http://www.ilog.com/jviews/tlds/jviews-maps-faces.tld" prefix="jvmf"%>
      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <f:view>
    
      <h:form id='jviewsForm'>
         <jvmf:mapView id='mapID' width='1280'
    height='800' data='/world.idpr'/>
      </h:form>
    
    </f:view>
    </body>
    </html>
    The component <jvmf:mapView> enables you to show the map produced with JViews Maps. The data attribute of this component references a JViews Maps project file. Note also that <jvmf:mapView> must be inserted with in a <h:form> component.
This completes the coding of your JViews Maps JSF application. You can now proceed to deploy and test it.