Manuals
/
Brands
/
Computer Equipment
/
Network Router
/
IBM
/
Computer Equipment
/
Network Router
IBM
AS/400E manual
Please, tick the box below to download manual:
Contents
Main
Page
Page
Page
Contents
About HTTP Server for AS/400 Web Programming Guide (GC41-5435) ....v
Chapter 1. Writing Common Gateway Interface Programs ..........1
Chapter 2. Application Programming Interfaces .............23
Chapter 3. Using Net.Data to Write CGI Programs for You ..........79
Page
About HTTP Server for AS/400 Web Programming Guide (GC41-5435)
Conventions in this book
AS/400 Operations Navigator
Installing Operations Navigator
Prerequisite and related information
vi
How to send your comments
Page
Page
Chapter 1. Writing Common Gateway Interface Programs
Overview of the CGI
CGI and Dynamic Documents
2
Uses for CGI
The CGI process
Overview
4
Sending Information to the Server
Data Conversions on CGI Input and Output
CGI Input Conversion Modes
6
DBCS Considerations
8
CGI Output Conversion Modes
10
Returning Output from the Server
How CGI Programs Work
Parsing
12
Data manipulation
Response generation
Environment variables
14
Requests from Standard Search (ISINDEX) Documents
Passing SSL Environment Variables to a CGI Program
16
CGI Programs and AS/400 Activation Groups
AS/400 Activation Groups
CGI Considerations
Activation Group Problem Examples
18
Page
20
Page
Page
Chapter 2. Application Programming Interfaces
APIs for CGI applications
24
(ILE)/C, ILE/RPG, and ILE/COBOL.
Get Environment Variable (QtmhGetEnv) API
Put Environment Variable (QtmhPutEnv) API
26
Read from Stdin (QtmhRdStin) API
28
Write to Stdout (QtmhWrStout) API
Convert to DB (QtmhCvtDB) API
30
Page
Parse QUERY_STRING Environment Variable or Post stdin data (QzhbCgiParse) API
32
Page
34
CGII0200 Format
Produce Full HTTP Response (QzhbCgiUtils) API
36
Page
Configuration APIs
Convert URL to Path (QzhbCvtURLtoPath) API
38
Page
Retrieve Directive (QzhbRetrieveDirective) API
40
Page
Retreive a list of all Configuration Names (QzhbGetConfigNames) API
42
Create a Configuration (QzhbCreateConfig) API
Delete a Configuration (QzhbDeleteConfig) API
44
Read a Configuration File into Memory (QzhbOpenConfig) API
Free a Configuration File from Memory (QzhbCloseConfig) API
46
Search for a Main Directive (QzhbFindDirective) API
48
Search for a Subdirective under Main Directive (QzhbFindSubdirective) API
50
Return Details of a Main Directive or Subdirective (QzhbGetDirectiveDetail) API
Add a Main Directive or Subdirective (QzhbAddDirective) API
52
Page
Remove a Main Directive or Subdirective (QzhbRemoveDirective) API
54
Replace a Main Directive or Subdirective (QzhbReplaceDirective) API
Server instance APIs
Retrieve a list of all Server Instances (QzhbGetInstanceNames) API
56
INSN0100 Format
Look up Server Instance Data (QzhbGetInstanceData) API
58
INSD0100 Format
Change Server Instance Data (QzhbChangeInstanceData) API
60
Page
Create a Server Instance (QzhbCreateInstance) API
62
Delete a Server Instance (QzhbDeleteInstance) API
Group file APIs
Create a new Group File (QzhbCreateGroupList) API
64
Read a Group File into Memory (QzhbOpenGroupList) API
66
Free Group File from Memory (QzhbCloseGroupList) API
Retrieve the next Group in the Group List (QzhbGetNextGroup) API
68
Locate a named group in a Group List (QzhbFindGroupInList) API
Retrieve the Name of a Group (QzhbGetGroupName) API
70
Add a new Group to the end of a Group List (QzhbAddGroupToList) API
Remove a Group from a Group List (QzhbRemoveGroupFromList) API
72
Retrieve the next User in the Group (QzhbGetNextUser) API
Locate a User in a Group (QzhbFindUserInGroup) API
74
Retrieve the Name of a User (QzhbGetUserString) API
Add a new user to the end of a Group (QzhbAddUserToGroup) API
76
Remove a User or Element from a Group (QzhbRemoveUserFromGroup) API
78
Chapter 3. Using Net.Data to Write CGI Programs for You
Overview of Net.Data
80
Chapter 4. Using Persistent CGI Programs
Overview of Persistent CGI
Named Activation Groups
Accept-HTSession CGI Header
HTTimeout CGI Header
Considerations for using Persistent CGI Programs
82
Persistent CGI Program Example
84
Chapter 5. Enabling your AS/400 to run CGI programs
How to enable the server to run CGI programs
Using directives for security and access control
86
The default fail rule
Explicit CGI enablement
Server runs only CGI programs
CGI program considerations
88
Chapter 6. Sample programs (in Java, C, and RPG)
Example of Java language CGI program
The samplejava program takes environmental and form variables and displays them back to the browser.
90
Page
92
Page
Example of C language CGI program
To call the SAMPLEC C program, add the following lines to an HTMLform:
94
The SAMPLEC program shows how to write a CGI program in C language.
Page
96
Page
98
Example of RPG language CGI program
To call the SAMPLE RPG program, add the following lines to an HTMLform:
The SAMPLE program shows how to write a CGI program in RPG language.
100
Page
102
Page
104
Example of a C language server configuration API program
106
Page
Page
Chapter 7. Writing Server API programs
Overview of the Server API
General procedure for writing Server API programs
Guidelines
Basic server request process
110
Application functions
112
HTTP return codes and values
Predefined functions and macros
114
Page
116
Page
118
Return codes
Server API configuration directives
Server API usage notes
120
Server API directives and syntax
Server API directive variables
Compatibility with other APIs
Porting CGI programs
122
Authentication and Authorization
Environment variables
Server API variables
124
Page
126
Page
Page
Chapter 8. Writing Java Servlets
Overview of servlets
Page
Chapter 9. Using Server-Side Includes
Considerations for using server-side includes
Preparing to use server-side includes
Format for server-side includes
Directives for server-side includes
132
timefmt specify date format: Use this tag to specify the format used when providing dates. Example:
134
Page
136
Page
138
Chapter 10. Troubleshooting your CGI programs
140
Page
142
Page
Page
Chapter 11. Notices
Programming Interface Information
Trademarks
146
Page
Page
ReadersComments Wed Like to Hear from You
ReadersComments Wed Like to Hear from You
___________________________________________________________________________________________________
GC41-5435-04
BUSINESS REPLY MAIL