Optimizing Servlet Performanc e
Optimizing Apache JServ 5-5
3. Edit jserv2.properties as follows:
port=8002
log.file=/usr/local/jserv/logs/jserv2.log
If JServ is included in your CLASSPATH, you can start the JServ processes with
these commands:
java JServ jserv1.properties
java JServ jserv2.properties
To start and stop the processes and the web server, it is convenient to use scripts.
Samples are included in the $ORACLE_HOME/Apache/Apache/bin/ directory
(startJServ. sh and stopJServ.sh).
Modifying jserv.conf to distribute the load
1. Set the flag to start processes manually.
ApJServManual on
2. Indicate where the servlet request is to be sent.
a. Locate the ApJServMount directive.
ApJServMount /servlets /root
If the user requests http://your.server.com/servlets/testServlet, the
ApJServMount directive above will execute testServlet in the zone called
/root.
b. Change the zone identifier from /root to balance://set/root and
then add the directives needed to describe the processes sharing the load:
ApJServMount /servlets balance://JServ_set/root
ApJServBalance JServ_set JServ1
ApJServBalance JServ_set JServ2 2
ApJServHost JServ1 ajpv12://127.0.0.1:8001
Note: If your HTTP server will be running on a different host than
the JServ processes, you must also add the IP address of the host
running the HTTP server to the security.allowedAddresses
parameter in each jserv.properties file.