Skip to main content

 
IBM Power Systems software  >  IBM i  > Software  > 

HTTP Server for i

Secure, powerful, and complete

  
Overview Getting Started Documentation Support

CGI Programming examples

For information on the key features of the HTTP Server, see About HTTP Server.  See also Limitations and Known Problems and Compatibility for important considerations.

UTF-8 CGI programming example. This example contains instructions to install and execute a ILE RPG CGI program that takes standard input from the user and for each language at a time (Arabic, French, English, German, Hebrew, Japanese and Russian) and returns the input along with other environment variables. This sample tries to illustrate how to allow different languages with incoming UTF-8 to work with a single CGI program. 

RPG CGI programming example. This example contains instructions to install and execute a ILE RPG CGI program that takes standard input from the user and returns the input along with other environment variables. 

C CGI programming example. This example contains instructions to install and execute an ILE C CGI program that takes standard input from the user and returns the input along with other environment variables. 

C CGI (compiled with locale object type *LOCALEUTF) programming example. As of V5R4 the HTTP Server (powered by Apache) is compiled with locale object type *LOCALEUTF. This example contains instructions for creating a C CGI also compiled with locale object type *LOCALEUTF.

Persistent C CGI programming example. This example contains instructions to install and execute a persistent ILE C CGI program that uses a global count variable to demonstrate how the server job stays alive.

C API programming example. This example contains source code for an ILE C program that calls configuration file APIs. Various APIs including QzhbOpenConfig, QzhbFindDirective, QzhbReplaceDirective are used as the program reads a configuration file and either replaces an existing directive or adds a new directive to a server configuration. 

Java CGI support. The HTTP Server product will continue to support Java Common Gateway Interface (CGI) programs using JDK 1.1 only. JDK 1.1 continues to ship with OS/400 in V5R2 but is no longer shipped with the 5722-JV1 product in V5R3. If you have Java CGI applications, you should migrate those applications to Java servlets using WebSphere Application Server or the integrated ASF Tomcat servlet engine.

COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrates programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.


 
Related links

WebSphere Application Server - Express for i5/OS

WebSphere Application Server for i5/OS

IBM Business Solutions


Redbooks

HTTP Server (powered by Apache): An Integrated Solution for IBM iSeries Servers

iSeries Acronym Glossary