Communicator e3000 MPE/iX Release 6.5 Express 2 (Software Release C.65.02) (30216-90322)

38 Chapter3
Technical Articles
Java Servlets for MPE/iX
}
}
To compile HelloWorld.java,
shell/iX>javac HelloWorld.java
or
shell/iX>/usr/local/java/latest/bin/javac HelloWorld.java
To run HelloWorld,
shell/iX>java HelloWorld
or
shell/iX>/usr/local/java/latest/bin/java HelloWorld
For information on installing and running Java, WebWise, or Apache on MPE/iX, please
refer to the Additional Resources section at the end of this document.
Configuration
Java Servlets are configured in a few, easy steps.
1. Copy the sample configuration files to create new ones.
2. Add one line in httpd.conf to load servlets.
3. Change the IP address in jserv.conf to view servlet status.
4. Modify the TZ variable in the job stream files.
Copy the Sample Configuration Files
The servlet installation job creates 3 sample configuration files in the directory conf/jserv.
These sample files are derived from their corresponding default files for use on MPE. Copy
these sample files to create your own configuration files. Make sure to log on first as
MGR.APACHE:
:HELLO MGR.APACHE
:xeq sh.hpbin.sys -L
shell/iX>cd /APACHE/SECURE/conf/jserv
or
shell/iX>cd /APACHE/PUB/conf/jserv
shell/iX>cp jserv.conf.sample jserv.conf
shell/ix>cp jserv.properties.sample jserv.properties
shell/iX>cp root.properties.sample root.properties
Modify httpd.conf for Loading Servlets
Modify your conf/httpd.conf file by adding an include directive after the last AddModule
directive in the module list. The included file, jserv.conf, contains a LoadModule directive
for loading the mod_jserv.so library.
For WebWise Secure Web Server, the include should be added after mod_ssl.c as shown