English

How To: Alias the Servlet Connector with WebSphere on UNIX

Summary

Using a number of ArcIMS clients, such as ArcMap and ArcExplorer, users can view, query, and even save features from ArcIMS map services. In most cases, this can be prevented by enabling authentication for IMS map services; however, in certain cases, entering a user name and password is less than desirable for public Web sites.

The only alternative is to alias the servlet connector. This enables browser-based clients, such as the HTML Viewer, to access map services. Other ArcXML capable clients, including ArcExplorer 3+, ArcMap, and ArcPad are not able to access these map services. Instructions provided outline how to accomplish this by deploying the ArcIMS Servlet Connector in a Web application.

Note:
It is assumed that ArcIMS is already configured and running with the default servlet connector.

Procedure

Deploy and configure the servlet connector for WebSphere. The basic procedure is as follows:

  1. Deploy a copied version of the ArcIMS Servlet connector as a Web application under a different context root. For example, /arcims as opposed to /servlet.
  2. Configure IBM HTTP Server to use this new context root.
  3. Alter the Web application so that it employs a different servlet pattern. For example, the default is 'com.esri.esrimap.Esrimap'. This is simplified to 'ims'.
Note:
This ensures an additional layer of security, since it is possible to configure ArcMap or any ArcXML-capable client to connect to map services if the new context root is discovered; however, thorough testing is recommended.
  1. Copy the ArcIMS Servlet Connector into a new Web application.
  1. Navigate to $AIMSHOME/Middleware/servlet_connector.
  2. Create a copy of the Servlet connector. For example:
cp arcimsservletconnector.war arcims.war
  1. Deploy the ArcIMS Servlet connector in WebSphere Application server.
  1. Open a Web browser and login to the WebSphere Administration Console: http://<servername>:9090/admin.
  2. In the left panel, expand Applications and click Install New Application.
  3. For the Path, enter the location of the .war file created in Step 1b.
  4. For the Context Root, type the following:
/arcims/*
  1. Click Next.
  2. Click Next at the Generate Default Bindings screen.
  3. An Application Security Warning page may appear, if so, click Continue.
  4. At the 'Provide options to perform the installation' screen, click Next.
  5. At the 'Map virtual hosts for web modules' screen, check on the option for arcims.war module and assign it to the "default_host" Virtual Host.
  6. At the 'Map modules to application servers' screen, check on the option for arcims.war and click Next.
  7. At the summary screen, click Finish.
  8. Click on the 'Save to Master Configuration' link.
  9. On the resulting page, click Save.
  10. On the left hand panel, click the Enterprise Applications link.
  11. Select the arcims_war application and click Start.
  12. Test the new context root by entering the following URL into a Web browser:
http://<servername>:9080/test/com.esri.esrimap.Esrimap?CMD=connectorping
The following should be returned:
IMS v9.0.0
Build_Number=871.1714
Version=9.0.0
Test successful
If not, retrace the steps outlined above.
  1. Configure IBM HTTP Server to employ the new context root.
  1. Navigate to the location of the plugin-cfg.xml, which the WebSphere Application server uses to communicate with the HTTP Server. Typically, this is located in /opt/WebSphere/AppServer/config/cells/ plugin-cfg.xml.
  2. Open the file with a text editor, for example, vi, and add the following line:
</ServerCluster>
<UriGroup Name="default_host_server1_aix52_Cluster_URIs">
<Uri Name="/snoop/*"/>
<Uri Name="/hello"/>
...
...
<Uri Name="/MessageDrivenBeans/docs/ko/*"/>
<Uri Name="/servlet/*"/>
<Uri Name="/arcims/*"/>
Note:
The "/servlet/*" mapping can be removed if no other Web applications employs this mapping.
  1. Restart IBM Http Server.
  2. Open a new browser and enter the following URL to determine if the new context path works on the default HTTP Server port. In this example, port 80 is used by default:
http://<servername>/test/com.esri.esrimap.Esrimap?CMD=connectorping

Again, a Test Successful result should appear as shown in step 2p.
  1. Configure the Web application to employ a new servlet pattern.
  1. Navigate to the location of the web.xml file for the deployed Web application. Typically, this is located in:
/opt/WebSphere/AppServer/config/cells/<nodename>/applications/arcims_war.ear/deployments/arcims_war/arcims.war/WEB-INF
  1. Open the web.xml file with a text editor and make the following changes, outlined in bold:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://
java.sun.com/j2ee/dtds/web-app_2_2.dtd">

  <web-app id="WebApp_1">
    <servlet id="ims">
      <servlet-name>ims</servlet-name>
      <servlet-class>com.esri.esrimap.Esrimap</servlet-class>
    </servlet>
    <servlet id="esriwms">
      <servlet-name>esriwms</servlet-name>
      <servlet-class>com.esri.wms.Esrimap</servlet-class>
    </servlet>
    <servlet-mapping id="ServletMapping_1">
      <servlet-name>ims</servlet-name>
      <url-pattern>/ims</url-pattern>
    </servlet-mapping>
    <servlet-mapping id="ServletMapping_2">
      <servlet-name>esriwms</servlet-name>
      <url-pattern>/com.esri.wms.Esrimap</url-pattern>
    </servlet-mapping>
</web-app>
  1. Save and close the file.
  2. Open the WebSphere Admin page and restart the arcims_war application as noted in step 2N – 2O.
  3. Open another Web browser and test the final aliased URL for the servlet connector. For example:
http://<servername>/test/ims?CMD=connectorping

The output result from step 2P should appear.
  1. Ping the ArcIMS Application Server. For example:
http://<servername>/test/ims?CMD=appserverping

The following should appear:
Version=9.0
Build_Number=871.1957
Test successful
Note:
The ArcIMS daemons may have to be restarted if an error returns for this test.
  1. Modify ArcIMS client applications to use the new alias.
  1. For each client application, locate and open the files indicated below in a text editor:
  • HTML Viewer: ArcIMSparam.js, Authorize.htm, aimsMap.js, and aimsXML.js
  • Java Viewer: default.axl
  • Custom viewers: Open any files that refer to the ArcIMS servlet connector.
  1. Change each occurrence of:
/servlet/com.esri.esrimap.Esrimap
to
/arcims/ims
Note:
These names are case-sensitive.
  1. Save and close the modified file(s).
  1. Test each client application to ensure it works with the new servlet path.
  2. Once the new clients are working with the new alias, a choice must be made to either shut down the default ArcIMS Servlet connector or to uninstall it in the WebSphere admin page. If the servlet connector is left installed, it can be used to administer map services with Administrator.
There are caveats to aliasing the servlet connector:
  1. The standalone Administrator program does not work anymore. This program uses the default Servlet Connector to communicate with the Application Server. Since this connector has been removed, the only alternative is to deploy the Web-based map service administrative application known as Service Administrator or 'esriadmin'. Steps on how to deploy this application are located in step 3A - Installing ArcIMS Service Administrator of the ArcIMS Install Guide. See link in the Related Information section below.
  1. In certain situations, the ArcIMS Post Installation must be executed. For example, this is required when updating ArcIMS with a service pack. When running through a typical Post Install, the default Servlet Connector will be re-installed on the system. This negates all of the changes made above, so it is imperative that the following steps are followed when executing the Post Install for ArcIMS:
    1. For a Custom Post Install: Uncheck the option to configure the Web server/Servlet Engine
    2. For a Typical Post Install: Select the option 'I will manually configure my Web server/Servlet Engine' at the Web server-Servlet Engine configuration screen.

Related Information