John Boylston wrote:
Sounds like you need PTF UK13567 / UK13568 / UK13569, which just shipped
in May.
No joy. Applied PTF. Same results.
... again: anyone have some clues how
to get a Java CGI working
under z/OS HTTP without
WebSphere?
Kind regards,
-Steve Comstock
Steve Comstock <[EMAIL PROTECTED]>
Sent by: MVS OpenEdition <[EMAIL PROTECTED]>
06/12/2006 01:36 PM
Please respond to
IBM TCPIP list <[EMAIL PROTECTED]>; Please respond to
IBM-MAIN <[email protected]>; Please respond to
MVS Open Edition <[EMAIL PROTECTED]>
To
[EMAIL PROTECTED]
cc
Subject
Help with Java CGI
Hi,
I'm trying to create a Java CGI to run using the z/OS
HTTP server, but not having a lot of luck. (z/OS 1.6,
java version 1.4.2 installed) (Note: I'm trying to do
this without using WebSphere, just the basic HTTP
server.)
The docs are ambiguous, at best. [Actually there is
only one relevant doc here: "HTTP Server Planning,
Installing, and Using" (SC34-4826-06 pub number, or
IMWZUI15.pdf from the IBM pubs site)].
p. 5.:
"If you plan to install WebSphere Application Server or use Java™ CGIs
on the Web server, you must install the correct version of the IBM
Software Development Kit (SDK),"
p. 16.:
"For Java support, you must install WebSphere Application Server. The
Application Server provides a Java-based Web application server
environment that enables you to develop and deploy new high-volume
transaction e-business applications and Web-enable legacy applications
and databases on z/OS."
p. 33:
"JAVA™_HOME: JAVA™_HOME points to the install root of the IBM Software
Development Kit on your system. Some applications such as WebSphere
Application Server and Java™ CGI’s require that you add the install root
to the paths of various environment variables in the httpd.envvars file.
If you do not, the program in question cannot initialize."
[Note: it is not clear what the "install root of the IBM Software
Development Kit" is, nor how to find it; I am assuming it is
/usr/lpp/java/J1.4/bin because that is where I find the binaries
for the "javac" and similar commands; however, I have also tried
/usr/lpp/java/J1.4 but with the same results.]
[Note: it seems that the "various environment variables" are the
PATH, CLASSPATH, and LIBPATH, so I manually set these to include
the JAVA_HOME value.]
p. 329:
"CGI programs can be written in any language supported by the operating
system on which the server is run. The language can be a programming
language, like C++, or it can be a scripting language, like Perl or
REXX. The HTTP Server also supports CGI programs written in the Java™
language."
p. 346:
"On the z/OS system, the HTTP Server depends on the settings of LIBPATH
and CLASSPATH to successfully execute CGI programs written in the Java™
language. The server refers to the LIBPATH setting to dynamically load
the z/OS Java run-time libraries and it consults the CLASSPATH setting
to locate z/OS Java class libraries and the CGI programs. You can find
these settings in /etc/httpd.envvars or its equivalent if you have
overridden it with ENVAR(″_CEE_ENVFILE=...″).
You will need to modify these settings for your configuration. For
example, if you have installed z/OS Java at /J1.1.8 and have placed your
CGI program, myjavacgi.class, in the
/usr/lpp/internet/server_root/cgi-bin directory, you will need to modify
your environment variables file (/etc/httpd.envvars or its equivalent)
as follows:
LIBPATH=/usr/lpp/internet/bin:/usr/lpp/internet/sbin:/J1.1.8/lib/mvs/native_threads
CLASSPATH=/usr/lpp/internet/server_root/cgi-bin:/J1.1.8/lib/classes.zip
Note: You must first compile your CGI programs written in Java with
javac and then use the resulting class file, optionally including the
.class suffix, as the name of the CGI program in your HTML file (for
example, /cgi-bin/myjavacgi.class).You must also place the class file in
a directory listed in the CLASSPATH environment variable. If you want to
use a directory other than the ones currently in CLASSPATH, append this
additional directory to the list in CLASSPATH, separated by a colon."
I'm doing all this, near as I can tell, but when I try to test,
the browser returns these messages:
Error 500
Error loading Java to run
Error 500
/u/scomsto/CGI/simple_cgi_get.class
Any suggestions?
Kind regards,
-Steve Comstock
----------------------------------------------------------------------
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