English

How To: Set up ArcIMS AppServerLink and JSP Samples on Windows

Summary

The ArcIMS Application Server Link (AppServerLink) is an ArcIMS Application Server Connector that sets up communication between the ArcIMS Application Server and a Java Server Pages (JSP) client. After installing the AppServerLink, changes must be made to the servlet engine configuration to allow ArcIMS, the AppServerLink, and JSP to work together. Start with the following steps:
1. Install the ArcIMS AppServerLink and JSP samples.
2. Install JDK 1.3.
3. Configure the servlet engine and copy JSP Web site directories to the correct location.
4. Test communications between ArcIMS components.
5. Configure and test the JSP samples.

Procedure

  1. Install the ArcIMS AppServerLink and JSP samples:
    Note:
    Be certain to complete the installation of the Web server and servlet engine and installation of ArcIMS before installing the ArcIMS AppServerLink and JSP samples. See the ArcIMS 3.1 Installation Guide for step-by-step instructions.

    A. Run ArcIMS setup.exe to install ArcIMS AppServerLink and Java/JSP samples using the ArcIMS Custom Install.

    B. At the Welcome screen, click Next. At the License Agreement screen, click I Accept.

    C. At the Installation Type screen, click Custom and click Next.

    D. At the ArcIMS Components and Installation Directory screen, uncheck everything except Application Server Connectors.

    E. Click the Application Server Connectors Options button. Uncheck Servlet Connector and check AppServerLink. Click OK.

    F. Check Samples and click the Options button. Uncheck Tutorial Data, and check Sample Java and JSP Applications. Click OK.

    G. Verify that the installation directory is correct. Click Next.

    H. At the Summary of Installation Information screen, click Next to begin the installation.

    I. At the Installation Successful screen, click Finish. It is not necessary to restart your computer.

    The following folders are now on your computer:
    · <ArcIMS installation directory>\Connectors\AppServerLink

    · <ArcIMS installation directory>\Samples\Java_JSP
  2. Install JDK 1.3:

    To run JSP, you must have JDK 1.3 on your computer. If using Tomcat, you must have JDK installed. If you are using IIS or iPlanet, you will probably need to install JDK.

    JDK 1.3 can be downloaded from the JDK 1.3 site in Related Information below.
     
    Note:
    It is possible to have multiple versions of JRE and JDK on the same machine; installing this version of JDK will not affect ArcIMS.
  3. Configure the servlet engine and copy JSP Web site directories to the correct location:
    Apache with Tomcat
    See: How To: Configure Apache with Tomcat and the ArcIMS AppServerLink and JSP Samples on Windows ServletExec with IIS
    See: How To: Configure ServletExec with IIS and the ArcIMS AppServerLink and JSP Samples on Windows
    Tomcat with IIS
    See: How To: Configure Tomcat with IIS and the ArcIMS AppServerLink and JSP Samples on Windows
  4. Test communications between ArcIMS components:
    A. Check that ArcIMS is operating correctly. Click Start > Programs > ESRI > ArcIMS 3.1 > ArcIMS Diagnostics.
    B. Click Test to test the ArcIMS Servlet Connector and ArcIMS Application Server.
  5. Configure and test the JSP samples:
    The JSP samples demonstrate the means to use Java beans and JSP to communicate with the ArcIMS AppServerLink. You should have a working knowledge of how to create MapServices, create and use virtual directories, and browse ArcIMS Web sites to work with the samples. Three JSP samples are included that show different functionality.
    · AdvancedViewer: The AdvancedViewer displays a main map with an overview map, a legend, and the ability to toggle the layers' visibility on and off. Functionality provided with the tool buttons are: zoom in, zoom out, pan, initial extent, and identify. The AdvancedViewer also demonstrates the means to read in a data source and plot the data on an acetate layer. Seismic data on recent earthquakes is stored locally in a file as an example data source.
    · Geocoder: The Geocoder sample demonstrates how to geocode against a street layer.
    · Extractor: The Extractor sample demonstrates how to extract specified layers by a users input.
    The three JSP samples require Image MapServices to be running. JSP does not support Feature MapServices. You can use one of your own Image MapServices or create one with the map configuration files and data provided.
    Note:
    You must start your Image MapService using JPG as the image output format, rather than PNG or GIF.
    To use the files provided, follow these steps:
    A. Verify that the following map configuration files:
    --<ArcIMS installation directory>\Samples\Java_JSP\Axl\world.axl
    --ovworld.axl
    --jsp_extract.axl
    --jsp_extract_display.axl
    --SanFrancisco.axl
    have the correct path to the data provided, in <ArcIMS installation directory>\Samples\Java_JSP\Data. This path is found in the SHAPEWORKSPACE element of the map configuration files.
    B. Using ArcIMS Administrator, create and start an Image MapService named 'world' from the world.axl file. Instructions to create and start a MapService, are in 'Using ArcIMS'. This MapService is used as the main map in the AdvancedViewer sample.
    C. Create and start an Image MapService named 'ovworld' from the ovworld.axl file. This MapService is used as the overview map in the AdvancedViewer sample.
    D. Open the SanFrancisco.axl file in ArcIMS Author, zoom in until the streets layer is visible in the table of contents, make the layer active in the table of contents, and build the geocoding indexes. Do not save any changes made to the SanFrancisco.axl from Author. Create and start an Image MapService named SanFrancisco from the SanFrancisco.axl file. This MapService is used in the Geocoder sample.
    E. Create and start an Image MapService named 'jsp_extract_display' from the jsp_extract_display.axl file. This MapService is used in the Extractor sample.
    F. Open the aimses.cfg file, within <ArcIMS installation directory>\Server\etc. Edit the aimses.cfg file to reflect access="PUBLIC". Restart the ArcIMS Application Server, and Monitor services. Refresh the site properties in ArcIMS Administrator. ExtractServer1 is now available as a Virtual Server selection. Create and start an Extract MapService named jsp_extract from the jsp_extract.axl file. This MapService is used in the Extractor sample.
    G. Save the site configuration.
    H. The AdvancedViewer default.jsp file that was copied to the root directory or a virtual directory must be edited to reflect the ArcIMS site. Edit the ...\AdvancedViewer\default.jsp file with your server's name, and the name of the MapService for the main map, such as 'world' or an Image MapService of your choice. Edit the name of the MapService for the overview map, such as 'ovworld' or an Image MapService of your choice. Variables for these parameters are at the beginning of the JSP file.
    I. View the JSP Web site sample applications in the Web browser. For servlet engines other than Tomcat, the root Web directory or any virtual directory is valid:
    · http://mymachine.domain.com/<virtual directory>/AdvancedViewer/default.jsp
    · http://mymachine.domain.com/<virtual directory>/Extractor/default.jsp
    · http://mymachine domain.com/<virtual directory>/Geocoder/default.jsp
    For the Tomcat servlet engine, the URL must point to the virtual directory established in Step 3. The example used in Step 3 was a virtual directory named jsp referencing the directory <Tomcat_home>\webapps\jsp. The following URLs point to the jsp virtual directory:
    · http:// mymachine.domain.com/jsp/AdvancedViewer/default.jsp
    · http:// mymachine.domain.com/jsp/Extractor/default.jsp
    · http:// mymachine.domain.com/jsp/Geocoder/default.jsp

Related Information