Is This Content Helpful?
We're glad to know this article was helpful.
The ArcIMS Servlet Connector, included with the ArcIMS product, can be used to administer the ArcIMS Application server and to serve requests from multiple clients, such as HTML Viewer, ArcMap. The Servlet Connector also includes an authentication mechanism to restrict access to MapServices for those users specified in a file or JDBC-based Access Control List (ACL). The ACL can prohibit specific requests from being sent to an ArcIMS service. Unfortunately there is no way to restrict specific portions of the request, therefore all or none of a certain request can be permitted. For example, if the GET_FEATURES request is forbidden in an ACL for a specific ArcIMS service and user, all GET_FEATURES requests sent to that service will be blocked. In short, the Servlet Connector does not provide a mechanism for restricting attributes or child elements of a request.
To restrict portion(s) of an ArcIMS request, a custom servlet implementing the Java Connector classes can be used. The Java Connector is included with the ArcIMS 4.x product and consists of four jar files: arcims_jconnect.jar, jcert.jar, jnet.jar, and jsse.jar. The Java Connector, like the Servlet Connector, also includes a mechanism for restricting access to mapservices. Moreover, the Java Connector classes can be easily implemented and customized in the Java development environment which can be used to restrict ArcIMS requests at any level. The sample servlet included with this article uses the Java Connector to communicate with an ArcIMS Application server and the Java Servlet API to communicate with Web clients using an HTML form. It includes string parsing techniques to evaluate incoming ArcXML requests for the presence of the 'geometry' attribute in a GET_FEATURES request. A property file, similar to the Esrimap_prop file used by the ArcIMS Servlet Connector, is used to enable or disable the ability of a client to retrieve feature geometry values.
The sample servlet is named the JConnServlet Connector and will only work with clients that use HTML forms, for example, ArcIMS HTML Viewer. The JConnServlet Connector will not work with clients that do not use HTML forms, for example, Java Viewers, ArcExplorer Java, ArcMap and ArcIMS Administrator.
See the Related Information section to download the sample. The sample contains the following files (with descriptions):
The Java classes associated with this connector are located in the com/esri/custom directory (package). The JConnServlet class files can be deployed as is (see steps below) and already contain the code necessary for disabling the ability of a client to retrieve feature geometry. The property file, jconnservlet_prop, is located in the root directory and is used to reference the ArcIMS Application server, port and enabling of feature geometry for the JConnServlet Connector. To disable retrieval of feature geometry, change the 'geometry' attribute to 'false'. The jconnservlet_prop file contains comments for further information on attributes listed.
The source code (*.java files) is located in the build directory. The JConnServlet Connector can be further developed to suit your needs. Each source file contains comments to assist you in understanding the logic introduced in the code. In order to recompile these classes, download and extract the Java Servlet API; see the link in Related Information. In general, each source file contains the following information:
JConnServlet.java - extends HttpServlet, responsible for processing the request and sending the response
Ping.java - includes methods used to check the communication with the connector and communication with the ArcIMS Application server
AxlRequestModifier.java - abstract class, contains framework for request modifier classes
GetExtractModifier.java - used to evaluate GET_EXTRACT requests, currently no filtering code included
GetFeaturesModifier.java - used to evaluate GET_FEATURES request, currently contains methods to filter requests containing the "geometry" attribute
GetGeocodeModifier.java - used to evaluate GET_GEOCODE requests, currently no filtering code included
GetImageModifier.java - used to evaluate GET_IMAGE requests, currently no filtering code included
This sample is not supported by ESRI
SUCCESS: ArcIMS Application Server Contacted Successfully
var esriBlurb = "/servlet/com.esri.esrimap.Esrimap?ServiceName="
var esriBlurb = "/servlet/com.esri.custom.JConnServlet?ServiceName="
var imsURL = 'http://server_name/servlet/com.esri.esrimap.Esrimap?ServiceName=World';
var imsOVURL = 'http://server_name/servlet/com.esri.esrimap.Esrimap?ServiceName=World';
var imsURL = 'http://server_name/servlet/com.esri.custom.JConnServlet?ServiceName=World';
var imsOVURL = 'http://server_name/servlet/com.esri.custom.JConnServlet?ServiceName=World';