REXX server pages (RSP) within Tomcat

Issues and Questions related to running Apache Tomcat on z/OS
Post Reply
Michele Modolo
Posts: 10
Joined: Fri Feb 10, 2006 6:04 am

REXX server pages (RSP) within Tomcat

Post by Michele Modolo »

Hi all,

it is possible to run REXX code from within a HTML page as like as it is possible to run Java code from within a HTML page. The latter technique is named JSP page whilst the former one is named RSP (Rexx Server Page).
RSP technology is built in IBM HTTP server (Apached derived) as described in the following link:
http://www-128.ibm.com/developerworks/o ... xx/?ca=drs

I used IBM HTTP server to run a RSP that I put in /shared_products/websrv/cgi_bin/ directory. It correctly worked.
Then I tried to run the same RSP in Tomcat: I put the RSP in /u/db00974/jakarta-tomcat-5.0.28/webapps/ROOT/WEB-INF/cgi/ (obviously I previously activated CGI in Tomcat as described in documentation). I ran the RSP but unfortunately it has treated as it were a pure HTML (REXX statements atre treated as plain text).
I foresaw the above unsuccessful outcome because I don't have Mod_Rexx module installed within Tomcat. Mod_Rexx is a REXX language processor module (described in the link above) which translate REXX code within a HTML page.

These are my issues:
1) In the link above people understand that Mod_Rexx module is built in IBM HTTP but there's no indication on how to implement it (if possible) within Tomcat.
2) In the document is reported that people should add the "AddType application/x-httpd-rexx-script .rex .rexx" declaration in httpd.conf in order for the RSP to be recognized and so interpreted by Mod_Rexx
Well, in my IBM HTTP server there's no AddType application/x-httpd-rexx-script .rex .rexx declaration, yet RSPs work fine as well!!
Actually in my IBM HTTP server RSPs are put as cgi in /websrv/cgi_bin/* and in the httpd.conf there is this related declaration:
"Exec /wser/* /websrv/cgi_bin/* " which simply means that all URL requests with "/wser/" included in their address have to be served by CGIs put in /websrv/cgi_bin/

If I try to treat RSPs as CGI REXX statements they are treated, as I said above, as plain text (so the REXX statements are not recognized as REXX statements...).

I hope someone could help me...

Thank you very much, regards
Michele
Michele Modolo
Posts: 10
Joined: Fri Feb 10, 2006 6:04 am

Post by Michele Modolo »

Please correct the wrong phrase:
I ran the RSP but unfortunately it has treated as....
with this correct one:
I ran the RSP but unfortunately it WAS treated as....

Sorry for rough mistake,
Michele
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Tomcat supports CGI (although I've never tried it on z/OS). It uses java.lang.Runtime.exec() to launch CGI programs, I wouldn't recommend this on z/OS since the overhead to start a child process is prohibitive.

There is no way to support Apache processor modules (like mod_rexx) in Tomcat.... its pure Java code after all.

You could run Apache (or IBM HTTP Server) together with Tomcat, using an HTTP proxy from Apache to Tomcat.

(It would be nice to have a JK/AJP connection between Tomcat and Apache, but I don't know of a source for a pre-built mod-jk on z/OS... if someone would port mod-jk/2 to z/OS Apache, we would be happy to host it or link to it on our site)
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

You might look at "NetRexx", which is a pure-java implementation of Rexx which can be used to implement servlets in Rexx.

http://www-306.ibm.com/software/awdtool ... index.html
http://kuoi.asui.uidaho.edu/~kamikaze/N ... ervlet.php
Post Reply