In this topic
About migrating to ArcGIS 10
At ArcGIS Server Java Web Application Developer Framework (ADF) 9.3.1, the Web Mapping Application (WMA) generated from ArcGIS Manager or developer integrated development environment (IDE) plug-ins cannot be run directly with JavaServer Faces (JSF) 1.2 libraries. At ArcGIS 10, there are several places in the faces-config.xml file that you need to modify to make it work.
Modifying the config.xml file
The two files you need to modify are faces-config.xml and ajax-renderers.xml.
Faces-config.xml
The basic rule is that if the <managed-property/> tag's <value/> contains an expression language (EL) referencing another managed-bean, the <property-class/> of the referenced bean must be specified.
Depending on 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 code example, the fieldAliases property is empty; consequently, the <managed-property> declaration needs to be removed:
[XML]
<managed-property>
<property-name>fieldAliases</property-name>
<map-entries/>
</managed-property>
Depending on 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 EL (for example, #{…} ) to reference a managed bean, you need to add the type information of the managed bean being referenced. The three options for using the JSF EL are as follows:
- The <managed-property> contains 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 code example, the LayerDefinition’s renderer property contains an EL reference. The method signature for LayerDefinition.setRenderer() in the javadoc contains the type information to use with <property-class>.
<managed-bean>
<managed-bean-name>layer1</managed-bean-name>
<managed-bean-class>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>
- The <managed-property> contains 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 code example, the WebQuery’s layerDefinitions property contains EL references. The method signature for WebQuery.setLayerDefinitions() in the javadoc contains the type information to use with <value-class>.
<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>
</managed-property>
<list-entries>
<value-class>com.esri.adf.web.data.query.LayerDefinition</value-class>
<value>#{layerdef1}</value>
</list-entries>
...
</managed-bean>
- The <managed-property> contains EL references under <map-entries>. In this case, you need to specify a <key-class> and <value-class> containing the fully-qualified class names of Java types that can be referenced as keys and values. The type information can found in the javadoc for the class whose <managed-property> is being set. In the following code example, the WebContext’s attributes property contains EL references. The method signature for WebContext.setAttributes() in the javadoc contains the type information to use with <key-class> and <value-class>.
<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>
</managed-property>
<map-entries>
<key-class>java.lang.String</key-class>
<value-class>java.lang.Object</value-class>
</map-entries>
<map-entry>
<key>map</key>
<value>#{map}</value>
</map-entry>
...
</managed-bean>
Ajax-renderers.xml
The change required for ajax-renderers.xml is limited to inserting
<value-class>com.esri.adf.web.faces.renderkit.xml.ajax.AJAXRenderer</value-class>
into the location defined in the following code example:
[XML]<value-class>com.esri.adf.web.faces.renderkit.xml.ajax.AJAXRenderer</value-class>
into the location defined in the following code example:
…<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>
…
Java EE schema header
Some application servers may require the Java EE schema header in your applications web.xml file be updated from 2.3 to 2.5. The basic template is shown in the following code example. 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 |