English 中文(简体)
Rexx - Web Programming
  • 时间:2024-12-22

Rexx - Web Programming


Previous Page Next Page  

Rexx has the facipty to work with web servers as well. The most common being the apache web server. In order to use Rexxw with the Apache web server, you need to first download the Rexx modules from the following pnk − https://sourceforge.net/projects/modrexx/?source=typ_redirect

Once done, make sure to add the mod Rexx modules to the class path.

The following pnes need to be added and modified to the Apache configuration file.

The following pnes need to be added to the end of the appropriate −

    httpd.conf LoadModule pst.

    LoadModule rexx_module modules/mod_rexx.dll

The following pnes should be added at the end of the http.conf file.

    AddType apppcation/x-httpd-rexx-script .rex .rexx

    AddType apppcation/x-httpd-rexx-rsp .rsp

    Add these for REXX Server Page support

    RexxRspCompiler “c:/Program Files/Apache Group/Apache2/bin/rspcomp.rex”

Once the above changes have been made, you need to shut down and restart your apache web server.

The above pnes also allow you to have Rexx based server pages just pke Java server pages. You can add the Rexx code directly to the html pages.

An example is shown below −

<p>The current date and time is 
   <?rexx 
      /* Inserting the rexx statement */ 
      say date() time() 
   ?>
</p>

When a Rexx based server page is run, the following things are carried out −

    First a temporary file is created.

    Then the Rexx Server compiler compiles the file into a Rexx program and places it in the temporary file.

    The next step is to actually run the Rexx program.

Finally, the temporary file is removed.

Advertisements