Consultor Eletrônico



Kbase P21274: How to setup Tomcat and the AppServer Internet Adapter AIA
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/10/2008
Status: Verified

GOAL:

How to setup TOMCAT and the AppServer Internet Adapter AIA

GOAL:

How to setup the AIA instance under Tomcat?

FACT(s) (Environment):

Progress 9.1x
OpenEdge 10.x
Tomcat
All Supported Operating Systems

FIX:

This solution applies to Tomcat version 4.x and below.
A) Setting up Tomcat to work with AIA:
The Tomcat Java Servlet Engine (JSE) includes its own Web server. This Web server should be used to test the Tomcat to AIA setup, prior to using the Apache Web server. The Tomcat Web server uses port 8080 by default, when Tomcat is started.

Assume that Tomcat is installed in TOMCAT_HOME directory and the Progress AppServer component(s) are installed in PROGRESS_HOME.
1. Defines a context for "aia" which will be used in a URL to access AIA. To do this perform the following:


a. Create a file apps-aia.xml in the TOMCAT_HOME/conf directory

b. Copy the following XML to the file:


<?xml version="1.0" encoding="ISO-8859-1"?>
<webapps>
<Context path="/aia" docBase="webapps/aia" debug="0" reloadable="true"></Context>
</webapps>
2. Create three new directories in the TOMCAT_HOME/webapps directory:


webapps/aia
webapps/aia/WEB-INF
webapps/aia/WEB-INF/lib

3. Create a new file named "web.xml" in the TOMCAT_HOME/webapps/aia/WEB-INF directory.
Add the following XML to the file and substitute the correct value PROGRESS_HOME:


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
<servlet>
<servlet-name>Aia</servlet-name>
<servlet-class>com.progress.aia.Aia</servlet-class>

<init-param>
<param-name>InstallDir</param-name>
<param-value>PROGRESS_HOME</param-value>
</init-param>

<init-param>
<param-name>instanceName</param-name>
<param-value>Aia1</param-value>
</init-param>

<init-param>
<param-name>propertyFileName</param-name>
<param-value>PROGRESS_HOME/properties/ubroker.properties</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>Aia</servlet-name>
<url-pattern>/Aia</url-pattern>
</servlet-mapping>
</web-app>

4. Copy PROGRESS_HOME/java/aia.zip into the TOMCAT_HOME/webapps/aia/WEB-INF/lib directory,

5. Rename the new copy of "aia.zip" to "aia.jar".

6. Make the following modifications to the TOMCAT_HOME/bin/tomcat.sh (tomcat.bat for Windows) file. Tomcat requires a minimum Java 2 run time environment.


UNIX - tomcat.sh

TOMCAT_HOME=where_you_installed _tomcat; export TOMCAT_HOME
JAVA_HOME=$DLC/jre/; export JAVA_HOME

# The two above variables are general Tomcat variables, not specific to Progress. Tomcat requires a Java 2 JDK (or JRE), the JRE that ships with Progress on some UNIX
# platforms is suitable ($DLC/java).

# LD_LIBRARY_PATH is correct for both Solaris and Linux. Use LIBPATH for AIX.
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DLC/lib;
export LD_LIBRARY_PATH
WRKDIR=specified_at_progress_install; export WRKDIR

# The three variables above are required by AIA; use the appropriate library p.ath value for your system, usually LD_LIBRARY_PATH or LIBPATH.

7. Modifications to PROGRESS_HOME/properties/ubroker.properties.

To be able to "ping" AIA in step 9, in the [AIA] section, change "allowAiaCmds=0" to "allowAiaCmds=1". This is set to zero initially for security purposes.

If you did NOT install either the Secure AppServer or Secure AIA components of Progress, continue with the next step.

If you did install either of these components, the default AIA instance that is defined will expect to use a secure web server and will redirect an HTTP request to HTTPS. If you do not want this behavior, in the [AIA] section change httpsEnabled=1 to httpsEnabled=0".

8. Start tomcat, run TOMCAT_HOME/bin/startup.sh (Unix).

9. From a local browser, try this URL: http://localhost:8080

This brings up the top level Tomcat page. Choose the "Servlet Examples" page and try executing some of the programs. Then try:

http://localhost:8080/aia/Aia

You should get "Aia1 OK" page.

Also try:

<ahref="http://localhost:8080/aia/Aia?GetServletStatus">http://localhost:8080/aia/Aia?GetServletStatus</a>

A "Summary of Connection Status" page with details about how Aia1 is configured in ubroker.properties.

You should not go further with Apache to Tomcat configuration unless you are successful to this point!

10. At this point you can test Tomcat > AIA > Progress AppServer.
Try running a Progress (4GL) client connect through Tomcat/AIA and to the Progress AppServer.
.