The mod_jserv Apache Module is a 100% pure Java Servlet engine fully compliant with the JavaSoft Java Servlet API 2.0 specification.

NOTE: The mod_jserv Apache module is an older bridge between Java and Apache. On FreeBSD Virtual Servers this is used to incorporate all the parsing of JavaServer Pages as well. The mod_jserv module runs unmodified on Solaris and talks to the Jakarta Tomcat Server if it is available, but is not as fast (and is no longer supported by the Java Apache group) as the mod_jk Apache Module is. For those who are migrating a lot of FreeBSD JavaServer Pages to Solaris, this might be a good solution until they can use the mod_jk module.

NOTE: The Java Servlet engine can be very memory intensive. It may be necessary to upgrade your Virtual Server in order to use mod_jserv.

Installation

Connect to your Virtual Private Server via Telnet or SSH and do the following.

  1. Install the mod_jserv Apache module. Follow the directions that correspond to your server O/S.


  2. Using your favorite UNIX file editor find the following line in your ~/www/conf/httpd.conf file and uncomment it to enable mod_jserv. To uncomment the line, remove the # character.

    #LoadModule jserv_module /usr/local/etc/httpd/modules/mod_jserv.so
  3. Restart the Web Server.

Is mod_jserv Running?

At this point, if you run the top program you should see the Java Servlet engine running. The output to top will look something like this. The line with the COMMAND java is the Java Servlet engine.

last pid: 24593;  load averages:  0.00,  0.01,  0.00   up 10+04:48:51  20:10:25
11 processes:  1 running, 10 sleeping
CPU states:  0.4% user,  0.0% nice,  1.5% system,  0.0% interrupt, 98.1% idle
Mem: 18M Active, 160M Inact, 24M Wired, 6304K Cache, 8273K Buf, 29M Free
Swap: 512M Total, 512M Free

PID USERNAME PRI NICE  SIZE  RES STATE   C  TIME  WCPU   CPU COMMAND
24593 biff   28   0  1500K   720K CPU1   1  0:00  3.08%  0.29% top
24192 biff   18   0 20676K  3240K pause  0  0:47  0.00%  0.00% java
24185 biff   10   0  2108K  1300K nanslp 1  0:01  0.00%  0.00% httpsd
24181 biff   18   0  2156K  1384K pause  0  0:00  0.00%  0.00% httpsd
24590 biff   18   0  1304K   964K pause  0  0:00  0.00%  0.00% tcsh

You can also check to see if the Java Servlet engine is running by trying this URL.

http://YOUR-DOMAIN.NAME/servlet/Hello

If you see the following message in your browser then it is installed and running correctly.

Example Apache JServ Servlet

Congratulations, ApacheJServ 1.1 is working!

If you don't get the above message then check your error_log file and try enabling Apache Jserv logging by editing the following line in your ~/www/conf/jserv/jserv.properties file to read true instead of false.

log=false

You may also try adding the Debug log channel by adding the following to your jserv.properties file.

log.channel.debug=true

NOTE: Logging can be a very expensive operation in terms of performance. You should turn logging off as soon as you correct the problem you are diagnosing.

More Information

For more information, see:

Please note: the information on this page applies to ITS web hosting plans. It may or may not apply to other environments. If you are looking for a feature described here, or better support from your hosting provider, please consider hosting your site with ITS!

1555 N Naperville/Wheaton Road, Suite 107
Naperville, IL 60563
phone 630.420.2550
fax 630.420.2771