Kbase 21924: Setting Up AIA with Tomcat 3.3a X Apache (mod_jserv plug-in)
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/04/2002 |
|
SUMMARY:
This Solution provides directions for setting up AIA using Tomcat
3.3a with the Apache Web server using the mod_jserv plug-in.
EXPLANATION:
These instructions assume Tomcat is already set up and working
properly. Also, make sure that the servlet engine is working. You can check the examples provided with Tomcat with:
http://server-name:8080
NOTE: 8080 is the default port of the Tomcat HTTP connector.
If you have a configuration problem, please refer to online
documentation at:
http://jakarta.apache.org/tomcat/index.html.
You will also need to download the mod_jserv module from Jakarta's website.
SOLUTION:
Assume that Tomcat is installed in TOMCAT_HOME directory and the Progress AIA is installed in PROGRESS_HOME.
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. Here 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 (new dir)
webapps/aia/WEB-INF (new dir)
webapps/aia/WEB-INF/lib (new dir)
3) Create a new file named "web.xml" in the
TOMCAT_HOME/webapps/aia/WEB-INF directory. Here is 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, then rename the
new copy of "aia.zip" to "aia.jar". (NOTE: earlier versions of
Tomcat allowed you to modify CLASSPATH in the Tomcat startup
scripts to include aia.zip (or progress.zip) and not have to
un-zip the file. This will not work in Tomcat 3.3a.)
5) You will need to make some modifications to the
TOMCAT_HOME/bin/tomcat.sh (tomcat.bat for Windows) file. Tomcat
requires a minimum Java 2 run time environment. The JRE provided
with Progress 9.1C is recommended for this.
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 above variables are required by AIA, use the
# appropriate library path value for your system, usually
# LD_LIBRARY_PATH or LIBPATH.
Windows - tomcat.bat
set TOMCAT_HOME=C:\jakarta-tomcat3.3a
set JAVA_HOME=C:\Program Files\Progress\jre
6) Modifications to PROGRESS_HOME/properties/ubroker.properties.
To be able to "ping" AIA in step 11, 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".
7) Start Tomcat, run TOMCAT_HOME/bin/startup.sh (Unix), or
TOMCAT_HOME/bin/startup.bat (Windows).
8) Edit Apache's configuration file, httpd.conf, and include the
following line at the end of the file:
Include <TOMCAT_HOME>/conf/jserv/tomcat.conf
Make sure you replace <TOMCAT_HOME> by the proper directory.
9) Edit <TOMCAT_HOME>/conf/jserv/tomcat.conf, and add a mapping for
AIA:
ApJServMount /aia /root
10) Start the Apache Web server.
11) Use the following URL to test your AIA configuration:
http:/host-name:port/aia/Aia
where host-name is your Web server name, port is the Web server
port number and AIA is the servlet name you have defined. You
should see either an OK message from the AIA or the message
'Internal Commands Restricted: Access Denied'.
Reference to Written Documentation:
Progress Knowledge Base Solutions:
20847, "AIA 9.1C - Internal Commands Restricted: Access Denied"
21877, "Setting up AIA with Tomcat 3.3.a on Apache (mod_jk plug-in)"
http://jakarta.apache.org/tomcat/index.html