Apache Java Server Install Instructions

Please Note:

You should be logged in as "root" when configuring, building, and installing Apache. If you are not logged in as root, the configuration scripts will do things slightly differently. For example, they will have the Apache HTTP Server listen to port 8080 instead of standard HTTP Server port 80.

These instructions are for a system running FreeBSD and assume the server will be installed in /usr/local/apache.


Get The Downloads You Will Need:
Java Servlet Development Kit:
http://java.sun.com/products/servlet
Apache JServ
http://www.apache.org/java/jserv
Apache HTTP Server (Version 1.3.3)
http://www.apache.org/java/jserv


Uncompress and/or Untar Downloaded Files

You will need to uncompress and untar all the files you have downloaded. For example:
uncompress apache_1.3.3.tar.Z
tar xvf apache_1.3.3.tar
Put the three trees you have uncompressed and untarred into directories such as:
/tmp/apache/apache_1.3.3
/tmp/apache/Apache-JServ-1.0b1
/tmp/apache/JSDK2.0


Configure Apache HTTP Server Source Tree
You need to configure the Apache HTTP Server source tree before you configure the Apache JServ source tree. The Apache JServ configuration script needs some files created by the Apache HTTP Server configuration script.
cd /tmp/apache/apache_1.3.3
./configure --prefix=/usr/local/apache


Configure Apache JServ Source Tree

The Apache JServ configuration script needs to be able to find the Java Servlet JAR file that you downloaded. So, add the "jsdk.jar" to your CLASSPATH. For example, you could do this:

export CLASSPATH=/tmp/apache/JSDK2.0/lib/jsdk.jar:$CLASSPATH

Now run the Apache JServ configuration script.

cd /tmp/apache/Apache-JServ-1.0b1
./configure --prefix=/usr/local/apache --with-apache-
src=/tmp/apache/apache_1.3.3 --enable-apache-conf


Make Apache JServ Source Tree
Make the Apache JServ Source Tree and install the files where they go. Running "make install" puts the files in the locations specified in the --prefix argument you used when you ran "configure".
cd /tmp/apache/Apache-JServ-1.0b1
make install


Make Apache HTTP Server
Make the Apache HTTP Server and install the files where they go. Running "make install" puts the files in the locations specified in the --prefix argument you used when you ran "configure".
cd /tmp/apache/apache_1.3.3
make install


Edit The Server's Configuration File
Edit the Apache HTTP Server's httpd.conf file so that it knows about the example Java servlet. Add the line below to the file /usr/local/apache/etc/httpd.conf.
Include /tmp/apache/Apache-JServ-1.0b1/example/jserv.conf
Please note, if the Apache HTTP Server is running when you edit its Configuration file, you will need to stop and start it to have the configuration file get read back in.


Running The Server
Run the Apache HTTP Server using the "apachectl" script.
cd /usr/local/apache/sbin
./apachectl start
Bring up a web browser and enter the URL of the machine on which you just installed the Apache HTTP Server. You should see a default page telling you it worked.


Try Running A Java Servlet
Try visiting one of these URLs:
Replace "yourmachine" with your machine's name.
http://yourmachine/example/Hello
http://yourmachine:80/example/Hello




Copyright 1997-1999 Lutris Technologies, Inc.
All rights reserved.