Creating Java Web applications

If you want to build Web applications that leverage Java Enterprise Edition, or if your requirements exceed the capabilities of the JavaScript APIs, consider using the ArcGIS Server Web Application Developer Framework (ADF). The Web ADF provides tools and templates for developing Web applications within the Java Enterprise Edition environment.

Once you install the Web ADF, you can access the developer plug-ins for Eclipse and NetBeans, which offer you the following:

The supported developer IDEs include Eclipse and NetBeans. These are excellent productivity tools for you to extend your Web Mapping Application. With the Web ADF, in addition to adding text boxes and buttons, you can add things such as a map and a table of contents directly to your Web application. The Developer Help assumes that you are already familiar with this development environment and understand standard Java Enterprise Edition JSF controls.

Starting with the Web Mapping Application

The Web ADF comes with the Web Mapping Application, which is a ready-to-use application template. The Web Mapping Application can be easily created from the Manager application or by using one of the IDE plug-ins. You can run the Web Mapping Application directly from Manager and deploy it as-is without writing any additional code or use it as a starting point for creating a custom application by importing it into your developer IDE. In some cases, you may want to use the code or files included with the Web Mapping Application as a guide for your own projects.

Creating a new Web application

You can use the tools provided with the Web ADF to build a new Web application in a Java Enterprise Edition developer IDE without the use of a template or an application previously created in Manager. If you use Eclipse or NetBeans with the plug-ins installed, you can make use of the ADF's Web controls by adding them to your respective projects' class paths.

If you don't need to use the Web controls, or you want to go beyond the default functionality they provide, you can use the libraries provided with ArcGIS Server to programmatically connect to a server and work with the services running on it. Each of the libraries has an object model diagram that can help you visualize the classes in the library and their relationships. You can find the object model diagrams in the library reference section of the Developer Help.

Leveraging the Web ADF

The Web ADF is architected to support connections to multiple types of GIS services in Web applications and Web services. These include the following:

You can not only access multiple types of GIS servers but also combine the GIS services running on those servers into one map. The Web ADF supports adding multiple map services to a single map display, allowing you to seamlessly integrate map services running on the same server or different servers of varying types. For example, you can combine a map service running on an ArcIMS Server with one running on an ArcGIS Server. This multiservice architecture allows you to transparently overlay map services.

Each type of service that the Web ADF supports has its own API. This means that if a map contains several different types of services, you may need to work with several APIs. For example, if your map combines an ArcGIS Server service and an ArcIMS service, you may need to program with both ArcObjects and the ArcIMS API. Fortunately, the ADF provides a common API for navigating and querying a map containing multiple service types. This means that for operations involving the entire map—such as zooming to a specific extent—you can write the code using the Web ADF's convenience classes instead of writing the code in the API of each service type.

If you want to develop advanced features with a specific service type, the ADF provides a way to access the service's API in the Java environment. For example, you can use the ArcIMS API to work with ArcIMS services using Java classes. The Developer Help contains information about programming with multiple service types and how to access the APIs for each one.

In addition to the service types listed above, the Web ADF supports adding graphics to a map. In many cases, using a Web ADF graphics layer provides a lightweight alternative to other more advanced means of storing data, such as programmatically creating a feature class.

Extending the Web ADF

The Web ADF is designed to be flexible so that you can customize the following things:

The Toolbar control included with the ADF contains a default set of tools and commands used for map navigation and query. You can write code for your own tools and commands and add them to a toolbar. A common way to do this is to write the custom code in a class library, which you add to your developer IDE project. You can then configure each tool and command to execute code in the class library.

The Web ADF includes a number of out-of-the-box tasks that you can add to your applications. These include tasks for query, network analysis, and editing. These tasks are all built from a common framework in the Web Controls library. You can use the same framework to develop your own task.

The Web ADF supports the display and query of multiple types of services, such as ArcGIS Server services, ArcIMS services, and WMS services. In the context of the ADF, a service is called a data source. The ADF contains a framework for developing support for your own types of data sources in addition to those listed above.

Getting help

When you install the Web ADF, Developer Help is automatically installed. You can launch Developer Help from the desktop, from the command line on Linux/Solaris, or within your supported developer IDE.

To launch Developer Help from the desktop, do the following:

  1. Navigate to Start > All Programs > ArcGIS > Developer Help > Open Java Help.
  2. Click Developing Applications.

To open Developer Help from the command line on Linux/Solaris, do the following:

On Linux/Solaris, open the Java Developer Help as the installation owner by running the

To open Developer Help within Eclipse, do the following:

  1. From the Help menu, click Help Contents.
  2. Click ArcGIS Server.
  3. Click Developing Applications.

The library reference

The library reference includes brief descriptions for each class and member in the Web ADF. Some classes and members have extra remarks and code samples. Additionally, if a package has an object model diagram, you can find it in the library reference.

You can get to the library reference by following the steps above to open Developer Help. Once you click ArcGIS Server, you will see the Reference node in the table of contents.