The following requirements exist for building Apache JServ:
The complete Apache JServ installation requires less than 2Mb of hard disk space. The compiled, not-compressed jar archive is more or less 100Kb.
Apache JServ 1.0 works only with the Apache HTTP Server (both versions 1.2 and 1.3 are supported).
A fully compliant Java 1.1 Runtime Environment is required for Apache JServ to execute. The official list of compatible ports is found on the JavaSoft web site. The list of supported platforms and Java ports can be found here.
Note: since Apache JServ uses only standard Java APIs (java.*
),
please, do not submit a bug report if your Java virtual machine fails to execute Apache
JServ because of broken compliance. Send it to your Java virtual machine implementers.
The JavaSoft JSDK 2.0 is required by Apache JServ for proper servlet execution. This package is freely available from the JavaSoft web site (http://java.sun.com/products/servlet/index.html)
Note: this version of Apache JServ requires exactly the specified version of the JSDK in order to operate properly. Any other version (past, present or future) is not supported.
Any compiler compatible with the Java 1.1 specification. A list of supported Java compilers may be found here.
Make sure you have an ANSI-C compiler installed and relative Make tools. The GNU C compiler (GCC version 2.7.2 is fine) and GNU Make(make preferably version 3.75) from the Free Software Foundation (FSF) is recommended. If you don't have GCC then at least make sure your vendors compiler is ANSI compliant. You can find the homepage of GNU at http://www.gnu.org/ and the GCC distribution under http://www.gnu.org/order/ftp.html.
See your Apache documentation for more information on how to add DSO support and if your system is supported.
There are two choices:
If you are using a source distribution then you have to configure Apache first (some generated header files are needed for Apache JServ to pass its configure checks). You do not need to worry about specifying the mod_jserv module used to communicate to the servlet engine.
If you are using DSO then you can ignore this step. If you have a source distribution and would like to build it with DSO support and install it for use by Apache JServ then use the following options when configuring Apache:
--enable-rule=SHARED_CORE --enable-module=so
Now you are ready to configure Apache JServ. To do this you may (or may not) need to specify quite a few arguments to configure. These are:
For DSO use:
--with-apache-install=/path/to/apache/installation
Note: The configure script will check the default installation dir so if you have it there you may leave this argument out.
For a static compile use:
--with-apache-src=/path/to/apache/source
Note:For those using a source distribution we will configure apache for you (taking care to preserve your previous configuration) if you use this option:
--enable-apache-conf
In order to find java, javac, and jar you can use
the following options. By default we will first look at the JDK_HOME and JAVA_HOME
environment
variables, if they aren't set then will check your PATH environment variable. The results
from using the PATH can be overridden by:
--with-jdk-home=/path/to/jdk
And we will use these then. If they aren't found here we will tell you and default back to whatever is in your PATH.
Note: By default debugging symbols are left of the JServ classes, you can put them back in by using this:
--enable-debugging
Note:By default the jar file is not compressed, this can be changed like so:
--enable-compressed-jar
Being a servlet engine we need to know where your servlet classes are. If they are not in your CLASSPATH then you need to specify them like so:
--with-jsdk=/path/to/jsdk
To configure JServ so it will be statically linked in to the httpd, you might do the following:
cd /local/etc/src/Apache-JServ ./configure --with-apache-src=/local/etc/src/apache \ --prefix=/local/etc/jserv --with-jsdk=/local/etc/JSDK2.0/lib/jsdk.jar
To configure JServ so it will be linked in to the httpd as a DSO, and to use Apache's configure (your settings will be preserved), you might do the following:
cd /usr/local/etc/src/Apache-JServ ./configure --with-apache-install=/usr/local/etc/src/apache \ --prefix=/usr/local/etc/jserv --enable-apache-conf
In these examples, the strings in bold should be replaced with appropriate values for your system.
Once you have configured Apache JServ you can run make.
Run 'make install' to make a .jar file, and copy it and the docs into the directory you specified as --prefix.
If you are using an Apache source distribution then you also have to run 'make install' in the Apache source directory to build Apache with Apache JServ support in it.
You can see if Apache has loaded the mod_jserv module by executing 'httpd -l'.
At this point, you must configure the Apache JServ directives for Apache. There are example configuration files in the conf and example directories that come with the Apache JServ package that help with this process. The files in the example directory will help you configure a default zone named "example" so that your URL's will look like this:
<http://www.yourserver.com/example/Hello>There are three different types of configuration files for Apache JServ, the first one should be included in your httpd.conf file with the Apache "Include" directive. For example, in your httpd.conf file, you should have a line like this: "Include /path/to/jserv.conf".
Within your "jserv.conf" file, there is a line that gives the path to the second type of configuration file, the "jserv.properties" file. The line in the jserv.conf file looks like this: "ApJServProperties /path/to/jserv.properties".
Lastly, within the "jserv.properties" file is a line that points to your zone configuration file. If you have a zone called "example", then you will need to have an "example.properties" file and the location to this file is then defined with this line in your "jserv.properties" file: "example.properties=/path/to/file/example.properties"
You should make sure to edit all of these files and fill in the appropriate information according to the comments provided in each of the files. If you have questions about the definitions, you should consult the documentation in the docs directory, on the website, FAQ-O-Matic and/or the Users mailing list.
See the other howto's for info on setting up and running servlets.
Copyright (c) 1997-99 The Java Apache Project.
$Id: howto.unix_install.html,v 1.7 1999/06/09 05:21:28 jonbolt Exp $
All rights reserved.