You are here: Using SOAP > v2006.1 services > Tutorials and samples > JSP Axis samples set up v2006.1

S A M P L E S

JSP Axis samples set up v2006.1

The purpose of these samples is to demonstrate how to develop JSP applications for ArcWeb Services using Apache Axis 1.4. The set up instructions cover how to deploy the sample files and how to configure Web servers and servlet engines for the samples.

These samples assume you have Apache Axis 1.4, WebServer / ServletEngine to serve JSP Web applications and JDK 1.4.x. or greater running on your machine. You can download and install JDK from the Sun Developers Web site. They also assume you have an activated ArcWeb account and a program to unzip the sample code.

For more information on getting started with ArcWeb Services, see Getting started with ArcWeb Services and the SOAP toolkit tutorials.

NOTE: The <JSP Axis Sample installation directory>/jspaxissamples/src directory contains the Java package esri.aws.v2006_1.axisstubs. This package includes a set of Axis-created Java stubs. The class files, which are the part of the esri.aws.v2006_1.axisstubs package included in the JSP Axis samples download, were generated using the Axis wsdl2java utility.

For example, by typing in the command prompt, you generate a series of class files.
C:\>java org.apache.axis.wsdl.WSDL2Java http://www.arcwebservices.com/services/v2006_1/AddressFinder?wsdl -p esri.aws.v2006_1.axisstubs -v

See the Apache Axis Web site for more information on Apache Axis and the wsdl2java tool.

NOTE: For convenience, the Axis 1.4 JAR files that are required for these samples are included in the ZIP file.

NOTE: (from the Apache Axis Web site): Axis needs to be able to find an XML parser. If your application server or Java runtime does not make one visible to Web applications, you need to download and add it. Java 1.4 includes the Crimson parser, so you can omit this stage, though the Axis team prefer Xerces.

How to use

  1. Download the sample code (ZIP file).
  2. Unzip the sample code ZIP file.

NOTE: After installing the sample, your directory structure should look like the following:

>jspaxissamples
>AXIS.LICENSE
>jspaxissamples.war
>src
>webapp
>jsp
>WEB-INF
>lib (all AXIS related .jar files)
>classes
>esri
>aws
>v2006_1
>axisstubs

  1. Deploy the jspaxissamples web-app directory or jspaxissamples.war file on your Web server and servlet engine.  

NOTE: See How to Configure Your Web Server and Servlet Engine for information on deploying the samples.

  1. Replace [username] and [password] in the \jsp\authenticationManger.jsp file with your ESRI Global Account user name and password.
  2. Restart your Web/Application server.

NOTE for SUNONE Web/Application server: Make sure you have specified a valid directory path for web-app. Invalid entries for web-app will prevent your Sun Java System Web/Application server from starting.

  1. Invoke the sample in a browser by typing the following URL:

http://<localhost>[:port]/jspaxissamples/

For example:

http://myhostname:8080/jspaxissamples/  

How to Configure Your Web Server and Servlet Engine

This section explains how to configure the following Web servers and servlet engines to deploy JSP Axis samples.

Sun Java System (formerly Sun ONE) Web Server 6.1

  1. In a text editor, open <SunOne Installation Directory>/Sun/WebServer6.1/https-<localhost>.<domain>.com/config/server.xml.
  2. Scroll down and add the following line before </vs>

<WEBAPP uri="/jspaxissamples" path="<JSP Axis Sample installation directory>/jspaxissamples/webapp" enabled="true" />

For example

<vs>
..
<WEBAPP uri="/jspaxissamples" path="c:/jspaxissamples/webapp" enabled="true"/>
</vs>

  1. Save and close the file.
  1. Continue with How to Use Step 4.

Sun Java System (formerly Sun ONE) Application Server 7.0

  1. In a text editor, open <SUNONE_HOME>/AppServer7/domains/domain1/server1/config/server.xml.
  2. Scroll to the end of the file and add the following line before </applications>:

<web-module enabled="true" location="<JSP Axis Sample installation directory>/jspaxissamples/webapp" name="jspaxissamples" context-root="jspaxissamples "virtual-servers="server1"/>

For example

<applications dynamic-reload-enabled="false" dynamic-reload-poll-interval-in-seconds="2">
..
<web-module enabled="true" location="c:\jspaxissamples\webapp" name="jspaxissamples" context-root=" jspaxissamples" virtual-servers="server1"/>
</applications>

  1. Save and close the file.
  2. Continue with How to Use Step 4.

Microsoft IIS - ServletExec 4.2

  1. Choose Start | Programs | New Atlanta | ServletExec 4.2 ISAPI | ServletExec Admin to open ServletExec Admin.
  2. In the left sidebar under Web Applications, click Manage.
  3. Click Add Web Application.
  4. For Application Name, type "myjspaxissamples".
  5. For URL Context Path, type "/jspaxissamples".

NOTE:  This is the name you will use to run jspaxissamples.

  1. For Location, type "<JSP Axis Sample installation directory>\ jspaxissamples\webapp".
  2. Click Submit and close ServletExec Admin.
  3. Continue with How to Use Step 4.

Tomcat 4.1.xx

  1. Navigate to <JSP Axis Sample installation directory>\jspaxissamples and copy the jspaxissamples.war file to \<Tomcat_Home>\webapps folder.
  2. Stop and Start your Apache and Jakarta services and close the Services window.

NOTE:  You should now have a "jspaxissamples" folder under  \<Tomcat_Home>\webapps. This folder is the working folder for your JSP Axis samples.

  1. Continue with How to Use Step 4.

Visit the Feedback page to give comments or suggestions about the ArcWeb Developer's Guide.

ArcWeb site | ArcWeb support | support.esri.com

Copyright © ESRI