The VMS SharkOpenVMS Notes: Apache Tomcat

  1. The information and software presented on this web site are intended for educational use only by OpenVMS application developers and OpenVMS system attendants.
  2. The information and software presented on this web site are provided free of charge.
  3. The information and software presented on this web site are presented to you as-is. I will not be held responsible in any way if the information and software presented on this web site damages your computer system, business or organization (sounds like the legal warning from a Microsoft shrink-wrap seal, eh?)
  4. Is this text too small? You have two options:
    1. hold down the CTRL key while rolling the mouse wheel (zoom-in, zoom-out)
    2. use your keyboard like so:
      • hit: CTRL with "-" key to zoom smaller
      • hit: CTRL with "+" key to zoom larger
      • hit: CTRL with zero key to reset zoom
 

Table of Contents














Java, Apache Tomcat, etc.

Apache Tomcat is a standalone Jakarta product used to serve up Java generated content on port 8080 (by default). It is also able to serve-up HTML so it is also correct to think of Tomcat as a webserver written in Java.

Java vs. JavaScript

  1. JavaScript (originally called "LiveScript") is an interpreted "object aware" (although some say "object oriented") scripting language co-invented by Netscape and Sun Microsystems. The code runs in a your browser and is visible when you select "view source" under your browser's FILE menu.

  2. Java is a compiled "object oriented" language invented my Sun Microsystems. The Java compiler produces bytecode (not machine code) which can run on any computer provided a Java Virtual Machine (JVM) is installed on that target machine.

  3. Except for the first 4 characters of their names, Java and JavaScript have very little in common.

Installing Java and Apache Tomcat

Simplified Component Overview:

  1. Apache HTTPd is an HTML web server that usually listens on port 80.

  2. Apache Tomcat is a standalone Jakarta product used to serve up Java generated content on port 8080 (by default). It is also able to serve-up HTML so it is also correct to think of Tomcat as a webserver written in Java.

  3. Connectors are used to provide an internal communications channel between Apache HTTPd and Apache Tomcat. These connectors allow Apache HTTPd to divert what contains (based upon file extension) server-side Java via port 80 (or 443) over to Apache Tomcat. Don't waste time fooling around with connectors until you get the Tomcat server working properly on port 8080.
e-Business Product Name Confusion
Product Description/Notes
ANT Another Neat Tool (an Apache scripting tool meant to bypass your OS-based script interpreter)
Apache HTTPd Hyper Text Transport Protocol daemon is a standalone product which operates on TCP/IP ports 80 (http) and 443 (https) by default. When OpenVMS was owned by Compaq, this product was called CSWS (Compaq Secure Web Sever) pronounced "C-Swiss". Since HP bought (err, merged with) Compaq, I have heard HP engineers refer to this product as "Swiss" but the downloadable modules still have a "CSWS" prefix.
- CSWS_JAVAHP's name for Apache Tomcat (requires Java)
- CSWS_PERLHP's name for a module which enables Apache HTTPd to access Perl (requires Perl)
- CSWS_PHPHP's name of a module which provides Apache HTTPd with a PHP Interpreter
Apache TomcatA standalone Java-based web server product which operates on TCP/IP port 8080 by default
(configure the connector kit to facilitate back channels between HTTPd and Tomcat)
Confusingly, the Compaq/HP Tomcat module for OpenVMS is named CSWS_JAVA
- JakartaApache's umbrella name for Java projects
- Catalina Name of Tomcat's Servlet Container Technology
- CoyoteTomcat's Java-based HTTPd server
- JasperTomcat's JSP technology
GNV GNU Not VMS (Unix command interpreter for OpenVMS which includes BASH)
JavaStandalone product required by Tomcat. You want the development kit (because of the JIT compiler), not the run-time)
1.5
and
higher
  1.4
and
lower
 
JDK java development kit SDK standard development kit
JRE java runtime edition RTE run time edition
OpenSSLSecure Sockets Layer standalone product (not used by Apache HTTPd which has its own built-in SSL routines)
Question: So why would you ever use it? Answer: to support encryption in client apps or standalone server apps
Required by OpenVMS 8.x (used to validate HP patch kits)
PerlStandalone product (required by CSWS_PERL)
SOAP Toolkit 1.1SOAP 1.0 - based upon Apache SOAP 2.31 - Apache's proof of concept SOAP offering (now obsolete)
SOAP Toolkit 2.0SOAP 1.1 - based upon Apache AXIS/Java - Apache's first production SOAP engine (now obsolete)
AXIS2SOAP 1.2 - based upon Apache AXIS2/Java - Apache's second production SOAP engine
SSLSecure Sockets Layer standalone product (not used by Apache HTTPd which has its own built-in SSL routines)
Question: So why would you ever use it? Answer: to support encryption in client apps or standalone server apps
Required by OpenVMS 8.x (used to validate HP patch kits)
WSITWeb Services Integration Toolkit (technology for accessing high level language routines from Java-based web services)
UDDIUniversal Description Discovery and Integration is another Web Services component
(this technology has not lived up to original expectations)
gSOAP generated SOAP. Third-party SOAP engine supporting SOAP code based upon C/C++
(this looks like a very promising alternative to AXIS2/c which is not available on OpenVMS unless you are willing to do your own build from Apache sources)

Small Machine Caveat

Interpreted and semi-interpreted technologies like Java and SQL can take their toll on a server's computing power so don't expect much when running Tomcat on RISC (Alpha) machines manufactured in the middle 1990s. CISC (VAX) machines aren't even supported.

  Java Performance
best average low
system speed Above 500MHz 500 MHz Below 500MHz
system memory 1GB or higher 500 MB Minimum 256MB

I initially experimented with Tomcat on a discarded AlphaServer-2100 only to discover that the Tomcat server can take between 1-2 minutes to initialize (this link will help reduce this). Also, invoking a previously uncompiled "Java Scriptlet" might take up to 30 seconds before output is returned to the browser (but what would you expect from a computer built in 1994 with a 275 MHz clock, 128-MB of memory and no L2 cache?). This link suggests we shouldn't even attempt to install Tomcat on a machine this small. This same operations ran much faster on an AlphaServer-DS20e with two CPUs and 1 GB of RAM.

Installing Java

  1. You must install Java for OpenVMS before attempting to use Tomcat. Don't waste your time installing the run time edition (RTE or JRE). Instead you should install the full software development kit (SDK or JDK). Why? Many of the Tomcat files are supplied in .JSP form and so need to be compiled before use. Tomcat will do this for you on an as-needed basis provided a JAVA compiler is available (and it is not present in the runtime edition).
     

Installing Tomcat

  1. Next you must install CSWS_JAVA which contains the Tomcat server as well as the connector kit (mod_jk, mod_dk2, mod_webapp)

  2. Once set up, test the Tomcat server by pointing a browser to port 8080 like so:
     
        http://www.yada.net:8080
     
  3. Run script SYS$STARTUP: APACHE$JAKARTA_CONFIG.COM again and add connector support to Apache. I used "mod_jk2" due to some suggestions from the net.


    Note that "APACHE$JAKARTA_CONFIG.COM" places a copy of the desired control file in [.conf] for easy access
     
  4. Modify the appropriate workers file to modify Apache's mapping.

  5. Restart Apache HTTPd so the appropriate module (e.g.. mod_?) is loaded along with its connector control file.

  6. Create a Java Scriptlet (in one of the mapped directories) with the name HelloWorld.jsp. The file should contain the following:
    <html>
    <body>
    <%
    out.println("<h1>Hello World!</h1>");
    %>
    </body>
    </html>
  7. Now request that file on port 80 like so:

        http://www.yada.net/jsp-demos/HelloWorld.jsp

Links:


Back to OpenVMS
Back to Apache Notes
Back to Home
Neil Rieck
Kitchener - Waterloo - Cambridge, Ontario, Canada.