JServ module
Java Servlet Support
Overview
The JServ module interfaces Zeus with the Apache JServ Servlet Server. JServ is an 'Open Source' Servlet engine that is freely downloadable.For more information look at:
- The step-by-step installation guide
- JServ homepage
- Tomcat homepage
- Information about servlets
- Servlet tutorial
Zeus can also interface with Allaire's JRun Servlet engine, see the support web site for details.
Configuration
Zeus is configured to access a JServ servlet engine by specifying a 'mount point', under which any accesses are sent to the JServ engine. The JServ process can run on the same machine as the web server, or on a remote machine, or multiple remote machines to provide load-balancing and fault tolerance.A single mount point requires four pieces of information. The hostname of the machine running the JServ program, ('localhost' if you are running it locally), the port number the JServ program is bound to (JServ defaults to 8007), the context (previously known as a zone) to use, and the protocol version to use for the communication between the web server and the JServ engine.
Contexts (previously known as Zones)
Each context has its own 'CLASSPATH' to determine where Java classes should be found, and also allows for automatic reloading of classes upon servlet re-compilation. For more information on contexts, please refer to Sun's Java Servlet specification document.Protocols
The protocol chosen for a mount-point defines how the web server 'talks' to the JServ engine. The original versions of JServ, upto and including version 1.0 talked a protocol called ajpv11. More recent versions of JServ (>= 1.1) and Tomcat, talk a different protocol called ajpv12. These two protocols are incompatible with each other, however Zeus supports both on a per mount basis, so you can simultaneously run both JServ 1.0 and JServ 1.1 engines with Zeus if you desire.In summary, choose the protocol to use from the following table:
JServ version Protocol <= 1.0 AJPv11 >= 1.1 AJPv12 Usage
Once a mount point is set up, servlets are accessed via '<mountpoint>/<servletname>', for example, http://www.mysite.com/jserv/HelloWorld.Servlets that are in 'subdirectories', can be accessed by putting a '.' between directories, for example, /jserv/org.mysite.HelloWorld.
JServ itself provides a default servlet that generates information about itself, this can be accessed via a servlet called 'org.apache.jserv.JServ'. Thus if you mounted JServ on '/jserv', you can access this servlet via http://www.mysite.com/jserv/org.apache.jserv.JServ