Consultor Eletrônico



Kbase P67296: How to setup Tomcat 4.1.29 with 9.1D AppServer Internet Adapter (AIA) on Windows.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   13/10/2004
Status: Unverified

GOAL:

How to setup Tomcat 4.1.29 with 9.1D AppServer Internet Adapter (AIA) on Windows.

FACT(s) (Environment):

Windows

FIX:

This Solution provides directions for setting up AIA using Tomcat with the Apache Web server. NOTE: Progress Software does not offer technical support for Tomcat or Apache. These are only some guidelines for setting up this configuration.

Further setup information can be obtained from:
http://httpd.apache.org
http://jakarta.apache.org/


********************************************************************

Setting up AIA

There isn't much that needs to be done with configuring AIA for this example, as most of the defaults are appropriate. Therefore, you will notice that there is virtually nothing that needs to be done to the AIA itself, other than in step 5.

********************************************************************

Setting up Tomcat

Install Tomcat into a directory path
ame that contains no spaces. It has been found that Tomcat fails with various errors when this has not been done.

The Tomcat Java Servlet Engine (JSE) includes its own small Web server. This Web server should initially be used to test the Tomcat to AIA setup, prior to trying to use the Apache Web server. Apache does not supply it as a production Web server. It is not designed for that kind of use. It is designed for exampling and testing of JSE. The Tomcat Web server uses port 8080 by default, when Tomcat is started.


After installation, these are the configuration steps:

NOTE: Assume that Tomcat is installed in TOMCAT_HOME directory and the Progress AppServer component(s) are installed in PROGRESS_HOME. Also, you can use "/" within paths. e.g. c:/progress/91d/dlc.

1) Create a new file "apps-aia.xml" in the TOMCAT_HOME/conf directory; this defines a "context" for "aia" which will be used in a URL to access AIA.

This is an example of this 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. Here's an example of this file -- 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 and rename the file to "aia.jar". e.g. TOMCAT_HOME/webapps/aia/WEB-INF/lib/aia.jar

5) Modifications to PROGRESS_HOME/properties/ubroker.properties.

Change "allowAiaCmds=0" to "allowAiaCmds=1" in the AIA section of the ubroker.properties. This is set to zero initially for security purposes.

The default AIA instance is setup to redirect HTTP request to HTTPS. If you are not using Secure AIA disable the redirection.

In the [AIA] section .change httpsEnabled=1 to httpsEnabled=0".

6) Stop and restart the Tomcat service by going into Control Panel / Services and stopping/starting the Apache Tomcat service.

7) 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. If the Hello World servlet doesn't work then Tomcat is not working properly. You may need to re-install Tomcat.

8) If you past step 7, then try this URL:

http://localhost:8080/aia/Aia

You should get an "Aia1 OK" page. If you didn't, then you have either missed or incorrectly implemented one of the steps above.

The following URL can also give you more information once AIA is working:

http://localhost:8080/aia/Aia?GetServletStatus

If the two URLs above are working, then AIA is now configured and working as expected..