8. Server Side Java

8.1. mod_jserv

8.1.2. Prerequisites

8.1.2.1. JSDK 2.0 (mod_jserv req.)

8.1.2.1.3. Building and installing

Since JSDK is closed source there is nothing to build.

TipConfusing filename
 

The filename jsdk20-solaris2-sparc.tar.Z suggests to be a binary for sparc platform. Ignore it, this will work on all platforms

cd /usr/local/ 

uncompress jsdk20-solaris2-sparc.tar.Z
tar -xvf jsdk20-solaris2-sparc.tar

8.1.4. Building and installing

cd /usr/local

tar -xvzf ApacheJServ-1.1.2.tar.gz
cd ApacheJServ-1.1.2

./configure \
--prefix=/usr/local/jserv \
--with-apxs=/usr/local/apache/bin/apxs \
--with-JSDK=/usr/local/JSDK2.0 \
--enable-EAPI \

make
make install

CautionExtended API
 

Here it is important to use the compilerflag --enable-EAPI if Apache is compiled with mod_ssl.

8.2. jakarta-tomcat

8.2.4. Installing the binaries

cd /usr/local

tar -xvzf jakarta-tomcat-4.0.6.tar.gz

cd jakarta-tomcat-4.0.6

cd bin

rm *.bat

echo export JAVA_HOME=/usr/lib/java/ >> /etc/profile
. /etc/profile

Now you should be able to startup tomcat:
/usr/local/apache/jakarta-tomcat-4.0.6/bin/startup.sh

You should now be able to connect to: http://localhost:8080/index.html

For the further steps like installing your servlets and jsp-files, you are responsible by yourself...

TipEnvironment Variables
 

If Tomacat fails to start and/or your sevlets could not be started the most common error made is having not all needed classes in the CLASSPATH variable.

Notes

[1]

There is also version 1.4.0 of Java available, if you do not care about possible instability you can downloads this version.