How To: Alias the Servlet Connector using JRun 4


Instructions provided describe the steps to configure IIS with JRun for an aliased servlet connector; Creating an alternate Web Application that instead of using the default '/servlet/com.esri.esrimap.Esrimap' context uses '/arcims/ims'.

ArcIMS must be up and running, and the default servlet connector installed and configured before using this article.


Follow the steps below to configure the application.

  1. Deploy the ArcIMS Servlet Connector as a Web Application.
    1. Navigate to <drive>:\Program Files\ArcGIS\ArcIMS\Connectors\Servlet and copy the file arcimsservletconnector.war file.
    2. Paste the file into a directory where the new servlet is to be deployed; for example, C:\JRun4\servers\default\arcims
      Create a new folder if needed.
    3. Open the JRun Management Console (JMC), typically by clicking Start > Programs > Macromedia JRun 4 > JRun Management Console and Login.
    4. In the left frame of the Management Console, click the plus sign to expand default, then click on J2EE Components. This displays a list of current applications in the right panel.
    5. In the right frame, click on the button Add under Web Applications. This displays a dialog titled Deploy Web Application on default.
    6. Navigate to the directory where the arcimsservletconnector.war was placed and select the file; for example, C:\JRun4\server\default\arcims\arcimsservletconnector.war
      Click Deploy.
    7. Under the 'Web Application Overview:arcimsservletconnector.war' enter the following information about the new application.
    8. The Application Name is the name of the .war file; for example, arcimsservletconnector.war. The name helps identify the application in the JRun Management Console. The browser clients do not use this name.
    9. Under Context Path, enter a name that will be used to access the Servlet Connector location. This URL-suffix functions similarly to 'servlet' in the default ArcIMS configuration. This is important to record, since it is used in each Web application, HTML Viewer, and so forth, to access the Servlet Connector. The example for the Context Path used here is /arcims
      Include the slash.
    10. Under Document Root, navigate to the Directory where JRUN should put the Servlet Connector files; for example, C:\JRun4\servers\default\arcims. It can also be a separate folder, such as C:\ArcIMS\Servlet. JRun creates the directory as necessary.
      All Application attributes can be changed later on.
    11. Click Apply. The message, "Successfully updated properties." should appear. If an error occurs, follow the instructions to correct the problem, then click create again.
    12. In the left panel of the JRun Management Console, click default. This displays the Default Server properties in the right panel and the arcimsservletconnector.war file should appear listed as a Web Application.
    13. Restart the JRun services in the Windows services panel.
  2. Copy and configure the ArcIMS Servlet Connector files in the new location.
      1. Navigate to the default location of the Servlet Connector, typically at C:\JRun4\servers\default\default-ear\default-war\WEB-INF\classes.
      2. Select the Following files in this directory:
        Esrimap_prop, ServletConnector_Res.properties, ServletConnector_Res_en_US.properties (or equivalent), WMSEsrimap_prop, the com and the wms (ArcIMS 9.0 only) directory.
      3. Move these files to the directory selected above for the new Web Application Document Root; for example, C:\JRun4\servers\default\arcims or C:\ArcIMS\Servlet.
      1. In the new directory, open the existing file arcimsservletconnector.web.xml in a text editor and edit this line:
        change it to the preferred connector tag; for example,
        Save and Close the file.
        This connector tag is added to the URL chosen for the application. In this example /arcims/ims replaces the original /servlet/com.esri.esrimap.Esrimap usage.
      2. Open the file esrimap_prop in a text editor such as Notepad and verify that the value for your ArcIMS Application Server machine is correct in this line, otherwise edit it as necessary:
      3. Restart the Web server and servlet engine.
  3. Test the new servlet configuration by opening a Web browser and typing into the location window:
    and also test
    <servername> is the server name, or IP address, arcims is the Context Root for the application entered in Step 1 and ims is the conector tag for the servlet edited in Step 2 above.
    A test successful response should appear for both tests, with the build number and so forth. If not, recheck the Web application URL and settings, and check that the Servlet Connector files are in the Web application's root directory and the esrimap_prop file is edited correctly.
  4. Configure the ArcIMS site to use the servlet alias.
    For the client application, such as HTML or Java Viewer, to use the servlet alias, they must be modified to reference the new URL path and servlet name.
    1. In a text editor, open the files indicated:
      • For each HTML Viewer application: ArcIMSparam.js, Authorize.htm, aimsMap.js, and aimsXML.js
      • For each Java Viewer application: default.axl
      • For custom viewers: open any files that refer to the ArcIMS servlet connector.
    2. Change each occurrence of:

      where /arcims is the Web application Context Root, see Step 1, and ims is the servlet custom tag, see Step 2.
      The prefix and name are case-sensitive!
    3. Save and close the modified files.
  5. Test each client application to verify it works with the new servlet path.