Configuring REALWEB with Apache Tomcat – Updated

Refer to the following instructions for both Windows and UNIX platforms.

For Windows Installations:
RealWeb is an integral feature of Reality. It provides the DataBasic programmer with the facility to web-enable an application with little or no knowledge of HTML, allowing the retention of existing business rules and utilising developers existing skill sets.
The document below details what is required to install the RealWeb Servlets & HTML pages within an Apache Tomcat V7 environment. The same method can be used for Version 6, if required.
Refer to the PDF Using RealWeb with Apache Tomcat

Note: While the above PDF is specific to Windows it also contains general information that is relevant to UNIX platforms.
 

For UNIX Installations:

Pre-requisites
The following details the load of Apache 1.3.23 Solaris and Tomcat 3.3a. You may find later versions will also work, however, there could be differences – please refer to the relevant providers; Apache http://www.apache.org/ and Tomcat http://tomcat.apache.org/.

Install Apache

put the source file in /usr/local/src
# cd /usr/local/src
# gzip -dc apache_1.3.23.tar.gz|tar -xvf  
# cd apache_1.3.23
# ./configure prefix=/usr/local/apache enable-module=most enable-shared=max
# make
# make install

Edit the /usr/local/apache/conf/httpd.conf item 'Servername' with name of box apache's on
#sh /usr/local/apache/bin/apachectl start

check web server running by using URL http://servername – default apache page displayed

# sh /usr/local/apache/bin/apachectl stop

Install Tomcat

put the source file in /usr/local
# cd /usr/local
# gzip -dc jakarta-tomcat-3.3a.gz| tar -xvf
# cd jakarta-tomcat-3.3a/bin
# JAVA_HOME=/usr/java;export JAVA_HOME

# ./startup.sh

Check Tomcat using URL http://servername:8080/examples/servlet/SessionExample

# ./shutdown.sh

Add Realweb files

Put 'Realweb classes files' into /usr/local/jakarta-tomcat-3.3a/webapps/ROOT/WEB-INF/classes
reality.class
realityis.class
rwconfig.class
RwEntry.class

Put 'JReal.jar' into /usr/local/jakarta-tomcat-3.3a/lib/common

Create a directory /usr/local/apache/htdocs/realweb
Put 'Realweb html files' into /usr/local/apache/htdocs/realweb     -default in rwconfig
rwlogin.htm
rwloginfailed.htm
rwtimeout.htm

Put a 'realweb.ini' in /usr/local/jakarta-tomcat-3.3a/bin using

# cd /usr/local/jakarta-tomcat-3.3a/bin
# touch realweb.ini
# chmod 777 realweb.ini
# chown 1011 realweb.ini

# cd /usr/local/jakarta-tomcat-3.3a/bin  -start from here to find realweb.ini file
#./startup.sh

Check Realweb using http://servername:8080/servlet/rwconfig

-> New – tick | Submit
-> Section Name – test | Submit

'error database must be specified' This correct, any other errors you have a problem.

# ./shutdown.sh

Configure Tomcat with Apache

# cd jakarta-tomcat-3.3a/native/mod_jk/apache1.3
# sh build-solaris.sh

Build and configuration of mod_jk is complete.

# cd /usr/local/jakarta-tomcat-3.3a/bin
# ./startup.sh -jkconf           – *Note option* conf/auto/mod_jk.conf file is created
# vi /usr/local/apache/conf/httpd.conf  – add the following line to the end of file

Include /usr/local/jakarta-tomcat-3.3a/conf/auto/mod_jk.conf

Now start Tomcat and then Apache

# ./startup.sh     -start Tomcat First
# cd /usr/local/apache/bin
# ./apachectl start    -start Apache

Check examples working

URL <http://servername/examples/servlet/Hello>

-this is a servlet from Tomcat through Apache

To create your own context pages for Apache & Tomcat

Copy the admin (or any) directory to something new i.e.

/usr/local/jakarta-tomcat-3.3a/webapps/admin ->

/usr/local/jakarta-tomcat-3.3a/webapps/realapps

Re-copy the 'Realweb files' (as above) to ../realapps/WEB-INF/classes

Copy the admin (or any file) file apps-admin.xml -> 'apps-realapps.xml'

Edit the 'apps-realapps.xml' file to look like the following :-

               docBase="webapps/realapps"
            debug="0"
     reloadable="true" >
             
             
                                       path="logs/servlet_realapps.log"
    servletLogger="true"/>
 
 

Restart Tomcat and Apache

# cd /usr/local/jakarta-tomcat-3.3a/bin -need to start Tomcat from here
# sh /usr/local/apache/bin/apachectl stop
# ./shutdown.sh
# ./sh startup.sh
# sh /usr/local/apache/bin/apachectl start

Test Realweb now using URL http://servername/realapps/servlet/rwconfig – As above

All done…

Back to articles