Problems with jserv

1. I noticed RH is selling e-commerce bundle. Is this the only way to get the revised SWS which includes the Java Servlet support I'm looking for?

You may also compile the mod_jserv as a DSO with Secure Web Server 2.0's /usr/sbin/apxs and /usr/include/apache files, which are found in the secureweb-devel package. Or you could upgrade to the latest version of SWS.

2. How do I get Apache Jserv up and working with SWS 3.0?

The first thing you need to do is go and ftp the following files (never fear... these are binary files, not source code):

ftp://metalab.unc.edu/pub/linux/devel/lang/java/blackdown.org/JDK-1.1.7/i386/glibc/v3/jdk_1.1.7-v3-glibc-x86.tar.bz2
-and- http://java.sun.com/products/servlet/

You will have to go through a license agreement but what you want at this URL is Java Servlet Development Kit 2.0: for Unix (Solaris and Others). Once you get through the license agreement you will be able to download the following file: "jsdk20-solaris2-sparc.tar.Z".

After you have these files you will want to decompress and install them. Put them in the following places:

/usr/local/jdk117_v3
-and-
/usr/local/JSDK2.0

Now you need to edit the following file:
/etc/httpd/jserv.properties

Find the line which begins with "wrapper.bin" and change it to say this:
wrapper.bin=/usr/local/jdk117_v3a/bin/i686/green_threads/java

Next find the line which begins with "wrapper.classpath" and change it to say this:
wrapper.classpath=/usr/local/JSDK2.0/lib/jsdk.jar

Then find the line which begins with "security.authentication" and make sure it says this:

security.authentication=false

After this is done you will need to edit the following file:

/etc/httpd/conf/httpd.conf

You will need to find the following lines:

#LoadModule jserv_module      modules/mod_jserv.so

and make sure it looks like this:

LoadModule jserv_module      modules/mod_jserv.so
Note: the only change here was the removal of the "#" sign.

You also must find this line:

#AddModule mod_jserv.c

and make sure it looks like this:

AddModule mod_jserv.c

Now issue this command:

chmod 0644 /etc/httpd/logs/jserv.log

Then restart the httpsd daemon and tail the /etc/httpd/logs/jserv.log where you should see this:
"tail /etc/httpd/logs/jserv.log"
[07/10/1999 22:14:51:166] (INFO) jserv_watchdog:(23020) watchdog_cleanup()
[07/10/1999 22:14:51:193] (INFO) Apache Module was cleaned-up

And finally tail the /etc/httpd/logs/error_log where you should see something like this:
"tail /etc/httpd/logs/error_log"
[Thu Oct 7 22:14:56 1999] [notice] Red Hat Secure/3.0 (Unix) DAV/0.9.8 ApacheJServ/1.0 mod_perl/1.19 PHP/3.0.9 mod_ssl/2.2.8 OpenSSL/0.9.2b configured -- resuming normal operations
[Thu Oct 7 22:14:56 1999] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

Your Jserv module is now installed and working!

3. I've heard about JservSSI for Apache... where can I find out about it?

This link should help Apache JServSSI

4. What version of jserv is included with SWS?

It is version 1.0

5. Where can I get additional information on jserv?

This link should help Apache JServ

6. I keep getting the error "Premature end of script headers" with Jserv. What should I do?

Here's one possible solution:

Change the APJServMount configuration from

APJServMount /servlets /root
to
APJServMount /servlets ajpv11://localhost:8007/root

7. I am getting an error that says something like "can't find the JServ class". What should I do?

You have to make sure your wrapper.bin property in jserv.properties is pointing to the correct binary, and that your LD_LIBRARY_PATH is set in the wrapper.properties field (depending on who's JDK you are using).

Here it is again in more detail: In your jserv.properties file, make sure that you have this line:

# Apache JServ entry point class (should not be changed)
# Syntax: wrapper.class=[classname]
# Default: "org.apache.jserv.JServ"
wrapper.class=org.apache.jserv.JServ

If you have overridden the above line with something else, you must have at least one more line with the above in it. In other words if you have this:
wrapper.class=foo.bar.ack
you MUST also have another line like this:
wrapper.class=org.apache.jserv.JServ

They will be appended together internally.
Also, make sure that your wrapper.classpath= has the correct path to your ApacheJServ.jar file.
ie:

wrapper.classpath=/usr/local/jserv/ApacheJServ.jar

and one addendum... make sure the file permissions on the directory where the .JAR file lives have the 'x' bit set.

8. Where can I find specific information on configuring jserv?

There is a wonderful page which has been done by Ari Halberstadt. You can find it at:

Configuring and Using Apache JServ