Home > Support > FAQs, latest to oldest...

Northgate Reality

FAQs, latest to oldest...

Configuring REALWEB with Tomcat & Apache

UPDATE: using RealWeb with Apache Tomcat V6...
... Refer to the article on the Reality Google Forum in the Community File Area.
Note: While this is specific to Windows it also contains general information that is relevant to UNIX platforms.

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 :-

<?xml version="1.0" encoding="ISO-8859-1"?>
<webapps>
   <Context path="/realapps"
            docBase="webapps/realapps"
            debug="0"
     reloadable="true" >
              <SimpleRealm filename="conf/users/global-users.xml" />
              <LogSetter name="realapps_tc.log" path="logs/realapps.log" />
              <LogSetter name="realapps_servlet_log"
                         path="logs/servlet_realapps.log"
    servletLogger="true"/>
  </Context>
</webapps>

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