USING JSERV'S MANUAL MODE
by Alexei Kosut <akosut@apache.org>

This document explains how to compile and run JServ in manual
Normally, Apache starts the JServHandler process (JServHandler is the
Java class that acts as a servlet server) automatically when Apache
starts up, and kills it when Apache is stopped or restarted. However, you
may wish to start and stop JServHandler separately from Apache. JServ
provides this functionality if desired.

COMPILING THE MANUAL JSERV PROGRAM

In this directory (manual), there is a Makefile. Edit this to reflect
your system's setup (C compiler, options). Then type "make". This will
compile a program, "jserv", which will be used to run JServ.

CONFIGURING APACHE

Add the ServletManual directive to Apache's configuration:

ServletManual On

Now, Apache will not automatically start and stop JServHandler. You must
activate it manually.

RUNNING JSERV MANUALLY

Use the jserv program in the following form:

jserv javabin [-t] propfile port

This will run JServ manually. "javabin" should be the full path name of
your java runtime binary. "propfile" should point to the location of the
servlet properties file (see above), and "port" should be the port
JServHandler should run on. This should be the same as the ServletPort
directive.

The optional -t command-line switch will activate stack traces. If this is
present, and an exception or error is thrown by the servlet, JServ wil
print the stack trace to stderr.

Note that the ServletBinary, ServletClasspath, ServletLog and
ServletProperties directives are ignored when JServHandler is run
manually. Make sure the classpath is set correctly, including the JDK
libraries, the JSDK libraries, the apache.jserv package, and the locations
of your servlets.

Also, when run manually, JServ will not use authentication to confirm that
JServHandler is being invoked by its parent Apache. This means that anyone
on the machine can run Java servlets. It is not recommended you run
JServHandler manually on a machine that has logins not owned by the
administrator.

SHUTTING DOWN/RESTARTING JSERV

It is reccomend that you run jserv in the background (use the & shell
option), and shut it down by sending it a TERM signal. To do this, find
the process id (pid) of jserv using the ps command, and type "kill <pid>".
This will gracefully shut down JServ, allowing servlets to perform any
neccessary cleanup.

If you want to restart JServ, which will destroy all the servlets, you
can send a HUP signal to JServ, using "kill -HUP <pid>". Note that this
will not unload the Java VM, so classes will not be reloaded. If you have
made changes to a class, you will need to stop and start JServ.


