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

S A M P L E S

JSP Glue samples set up v2006.1

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

Glue is a distributed computing platform for Java. These samples assume you have one of the editions of webMethods Glue version 5.0.2 toolkit running on your machine and an activated ArcWeb account. They also assume you have a program to unzip the sample code.

You can obtain an evaluation version of Glue by contacting webMethods.

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

NOTE: The class files and map files, which are the part of the esri.aws.v2006_1.gluestubs package included in the JSP Glue samples download, were generated using the Glue wsdl2java utility. The wsdl2java command line tool generates a Java interface, helper class, data structures and a .map file from the WSDL.

For example, by typing in the command prompt,

"C:\>wsdl2java http://www.arcwebservices.com/services/v2006_1/glue/PlaceFinderSample.wsdl -p aws.v2006_1.gluestubs -g", you generate a series of class and map files.

See the Glue User Guide for more information on Glue and the wsdl2java tool.

NOTE: Separate WSDLs are available for Glue users. This is due to webMethods' diminished support for its Glue toolkit.

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:

>jspgluesamples
>jspgluesamples.war
>src
>webapp
>jsp
>WEB-INF
>lib (for all .jar files)
>maps (all MapFiles)
>classes ([webMethods-license.xml])
>esri
>aws
>v2006_1
>gluestubs

  1. Deploy the webapp directory or jspgluesamples.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. Tomcat users can skip the following steps and you can go directly to the step on configuring Tomcat.

  1. Copy GLUE.jar to the <JSP Glue Sample installation directory>\jspgluesamples\webapp\WEB-INF\lib directory. If your JDK version is earlier than 1.4, copy standard Java extension libraries dom.jar, jnet.jar, jcert.jar and jsse.jar to the <JSP Glue Sample installation directory>\jspgluesamples\WEB-INF\lib directory.

NOTE:  GLUE.jar and standard Java extension libraries dom.jar,jnet.jar,jcert.jar and jsse.jar are part of your Glue download and by default located at <glue install dir>\lib directory.

  1. Add webMethods-license.xml to the web-app's classpath [<JSP Glue Sample installation directory>\ jspgluesamples\webapp\WEB-INF\Classes].

NOTE: You only need to add the license file to the classpath if it was not to the GLUE.jar file.

  1. Replace [username] and [password] in the <JSP Glue Sample installation directory>\jspgluesamples\webapp\jsp\authenticationManger.jsp file with your ESRI Global Account user name and password.
  2. Restart your Web server.
  3. Invoke the sample in a browser by typing the following URL:

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

For example:

http://myhostname:8080/jspgluesamples/

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 Glue samples. NOTE: Servlet engines should comply with Servlet 2.3 specification for Glue 5.x to work properly.

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="/jspgluesamples" path="<sample Installation Directory>/jspgluesamples/webapp" enabled="true" />

For example

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

  1. Save and close the file.
  2. Stop and Start the Sun Java System Web Server and close the Services window.

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

  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="<Sample installation directory>\jspgluesamples\webapp" name="jspgluesamples" context-root="jspgluesamples" virtual-servers="server1"/>

For example

<applications dynamic-reload-enabled="false" dynamic-reload-poll-interval-in-seconds="2">
..
<web-module enabled="true" location="c:\jspgluesamples\webapp" name="jspgluesamples" context-root="jspgluesamples" 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 "myjspgluesamples".
  5. For URL Context Path, type "/jspgluesamples".

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

  1. For Location, type "<JSP Glue installation directory>/jspgluesamples/webapp".
  2. Click Submit and close ServletExec Admin.
  3. Stop and Start IIS Admin Service and World Wide Web Publishing Service and close the Services window.
  4. Continue with How to Use Step 4.

Tomcat 4.1.xx

  1. Navigate to <JSP Glue installation directory>\jspgluesamples and copy the webapp folder to \<Tomcat_Home>\Webapps.
  2. Copy GLUE.jar to the \<Tomcat_Home>\Webapps\webapp\WEB-INF\lib directory. If your JDK version is earlier than 1.4, copy standard Java extension libraries dom.jar, jnet.jar, jcert.jar and jsse.jar to the <Tomcat_Home>\Webapps\webapp\WEB-INF\lib directory.

NOTE:  GLUE.jar and standard Java extension libraries dom.jar,jnet.jar,jcert.jar and jsse.jar are part of your Glue download and by default located at <glue install dir>\lib directory.

  1. Add webMethods-license.xml to the web-app's classpath [<Tomcat_Home>\Webapps\webapp\WEB-INF\Classes].

NOTE:  You only need to add the license file to the classpath if it was not to the GLUE.jar file.

  1. Replace [username] and [password] in the <Tomcat_Home>\Webapps\webapp\jsp\authenticationManger.jsp file with your ESRI Global Account user name and password.
  2. Rename webapp directory to jspgluesamples under <Tomcat_Home>\Webapps folder.
  3. Restart your Web server.
  4. Invoke the sample in a browser by typing the following URL:

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

For example:

http://myhostname:8080/jspgluesamples/

 


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

ArcWeb site | ArcWeb support | support.esri.com

Copyright © ESRI