Tim,
I agree completely. Its not a good idea to launch a Java program under CGI.
It could work, given a little programming to the CGI API; but as you
correctly point out, the performance would be horrible.
I would add one option/alternative:
3) Use the open source Apache Tomcat Servlet engine under z/OS.
If you are just getting started with Java servlets and JSPs, you can
run a light weight, free servlet/JSP container as a batch job
or started task on z/OS.
There's a how-to guide for setting up Tomcat on z/OS at:
http://dovetail.com/docs
Also, if anyone is interested, we will be reprising our SHARE Lab
in Baltimore: "z/OS Tomcat in an Hour". The previous handouts
for that lab can also be found on the docs page above.
Kirk Wolf
Dovetailed Technologies
Tim Henness wrote:
If I understand your question, you're wanting to write a traditional CGI
program in java and have it run under the HTTP Server. This is in contrast
to using WebSphere Application Server, which runs as a web server plug-in.
I don't think you can call a Java program directly as a CGI, since the CGI
call specification is not what Java requires. It should be theoretically
possible to write a 'stub' CGI program in another language that will
call the Java program and translate between the two. But even if you did
you would *really not* be happy with the performance!
CGI performance tends to be pretty poor at best. Writing a CGI program is
Java would be unthinkably poor, since the system would have to create a JVM
(Java Virtual machine) for each CGI call. Creating a JVM is a very high
overhead activity. You're probably looking at several seconds of CPU time
for *every* CGI call.
The reasonable choices are:
1. Write it in another language.
a. If it's low-usage you can use REXX or shell script.
b. For moderate usage you might need to use C.
c. If it's high-usage you might need to write it as a GWAPI
plug-in, rather than CGI.
2. Get WebSphere Application Server.
Good luck!
Tim
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html