HOW TO

Connect through a proxy server with the ArcIMS Java Connector

Last Published: April 25, 2020

Summary

Instructions provided describe the proceedure to connect the ArcIMS Java Connector to a remote ArcIMS server using an HTTP connection.

Procedure



  1. Find the HTTP connection, the code will look like this:

    Code:
    java.net.URL connUrl = new java.net.URL("http://www.geographynetwork.com:80");

    connection.setConnectionType(connection.HTTP);
    connection.setUsername("myaccount");
    connection.setPassword("secret");
    connection.setUrl(connUrl);

  2. Add the following lines of code shown in bold to use the proxy server:
    Code:
    java.net.URL connUrl = new java.net.URL("http://www.geographynetwork.com:80");

    connection.setConnectionType(connection.HTTP);
    connection.setUsername("myaccount");
    connection.setPassword("secret");
    connection.setUrl(connUrl);

    java.util.Properties prop = System.getProperties();
    prop.put("http.proxyHost","proxy.mycompany.com");
    prop.put("http.proxyPort","80");


  3. The Java system properties http.proxyPort and http.proxyHost are used when connecting through a proxy server to a Web server.

    Set these properties before calling other functions, such as Map.initMap, which are used to connect to the ArcIMS server.

Article ID:000006476

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic