Migration to 10


In the ESRI ArcGIS Server Java Web ADF 9.3.1 release, the Web Mapping Application (WMA) generated from ArcGIS manager or Developer IDE plug-ins cannot be run directly with JSF 1.2 libraries. There are several places in the faces-config.xml file that you need to modify to make it work.
The two files you need to modify are faces-config.xml and ajax-renderers.xml.
First, changes needed in faces-config.xml. Basic rule is that for the <managed-property/> tag if its <value/> contains an EL referencing another managed-bean, the <property-class/> of referenced bean must be specified. 
Depending upon how some of the tasks have been configured in the web application, you may need to remove <managed-property> declarations if they contain empty <value/>, <list-entries/> or <map-entries/> tags.  In the following example, the ‘fieldAliases’ property is empty and the hence the <managed-property> declaration needs to be removed.
[XML]
<managed-property>
  <property-name>fieldAliases</property-name>
  <map-entries/>
</managed-property>
Depending upon which tasks or resources have been added to the application, you may also need to make the following changes to the application’s JSF configuration files (listed in the javax.faces.CONFIG_FILES parameter in web.xml). For any <managed-property> that uses the JSF Expression Language (eg: #{…} ) to reference a managed-bean, you need to add the type information of the managed-bean being referenced. There are 3 possible ways in which JSF EL may be being used: 
1. The <managed-property> could contain EL references in its <value>. In this case, you need to specify a <property-class> containing the fully qualified class name of the Java type that can be referenced. The type information can found in the javadoc for the class whose <managed-property> is being set. In the following example, the LayerDefinition’s property ‘renderer’ contains an EL reference. The method signature for LayerDefinition::setRenderer() in the javadoc contains the type information to use with <property-class>.
[XML]
<managed-bean>
   <managed-bean-name>layer1</managed-bean-name>
   <managed-beanclass>com.esri.adf.web.data.query.LayerDefinition</managed-bean-class>
  ...
  <managed-property>
     <property-name>renderer</property-name>
     <property-class>com.esri.adf.web.data.renderer.WebRenderer</property-class>
     <value>#{layer1_renderer}</value>
  </managed-property> 
  ...
 </managed-bean>
2. The <managed-property> could contain EL references under <list-entries>. In this case, you need to specify a <value-class> containing the fully qualified class name of Java types that can be referenced. The type information can found in the javadoc for the class whose <managed-property> is being set. In the following example, the WebQuery’s property ‘layerDefinitions’ contains EL references. The method signature for WebQuery::setLayerDefinitions() in the javadoc contains the type information to use with <value-class>
[XML]
<managed-bean>
<managed-bean-name>webappQuery</managed-bean-name>
     <managed-bean-class>com.esri.adf.web.data.query.WebQuery</managed-bean-class>
     <managed-bean-scope>none</managed-bean-scope>
     <managed-property>
        <property-name>layerDefinitions</property-name>
        <list-entries>
           <value-class>com.esri.adf.web.data.query.LayerDefinition</value-class>
           <value>#{layerdef1}</value>
  ...
   </managed-bean>
3. The <managed-property> could contain EL references under <map-entries>. In this case, you need to specify a <key-class> & <value-class> containing the fully qualified class names of Java types that can be referenced as keys & values. The type information can found in the javadoc for the class whose <managed-property> is being set. In the following example, the WebContext’s property ‘attributes’ contains EL references. The method signature for WebContext::setAttributes() in the javadoc contains the type information to use with <key-class> & <value-class>
[XML]
<managed-bean>
   <managed-bean-name>mapContext</managed-bean-name>
   <managed-bean-class>com.esri.adf.web.data.WebContext</managed-bean-class>
   <managed-property>
      <property-name>attributes</property-name>
      <map-entries>
         <key-class>java.lang.String</key-class>
         <value-class>java.lang.Object</value-class>
      <map-entry>
         <key>map</key>
         <value>#{map}</value>
      </map-entry>
    ...
 <managed-bean>
Changes required for ajax-renderers.xml are limited to inserting the following line: 
<value-class>com.esri.adf.web.faces.renderkit.xml.ajax.AJAXRenderer</value-class>
into the location defined below: 
[XML]
<managed-bean>
  <display-name>AJAXRenderers</display-name>
  <managed-bean-name>AJAXRenderers</managed-bean-name>
  <managed-bean-class>java.util.ArrayList</managed-bean-class>
  <managed-bean-scope>request</managed-bean-scope>
  <list-entries>
    <value-class>com.esri.adf.web.faces.renderkit.xml.ajax.AJAXRenderer</value-class>
    <value>#{ajaxMapRenderer}</value>
    ….<value>#{ajaxOverviewRenderer}</value>
    <value>#{ajaxMapViewerGpAsyncTaskResultsRenderer}</value>
  </list-entries>
</managed-bean>
…..
Additionally, some application servers may require the Java EE schema header in your applications web.xml file to be updated from 2.3 to 2.5.  The basic template is offered below, simply cut and paste into your web.xml file replacing the <web-app id …> as appropriate. 
[XML]
<web-app id="WebApp_ID"
         xmlns="http://java.sun.com/xml/ns/javaee" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
   metadata-complete="true" 
         version="2.5">






Development licensing Deployment licensing
Server Server