Справочник ПользователяСодержаниеContents5About HTTP Server for AS/400 Web Programming Guide(GC41-5435)7Conventions in this book7AS/400 Operations Navigator7Installing Operations Navigator8Prerequisite and related information8How to send your comments8Chapter 1. Writing Common Gateway Interface Programs11Overview of the CGI11CGI and Dynamic Documents12Uses for CGI13The CGI process13Overview13Sending Information to the Server15Data Conversions on CGI Input and Output15CGI Input Conversion Modes16DBCS Considerations17CGI Output Conversion Modes19Returning Output from the Server21How CGI Programs Work22Parsing22Data manipulation22Response generation22Environment variables23Requests from Standard Search (ISINDEX) Documents25Passing SSL Environment Variables to a CGI Program25CGI Programs and AS/400 Activation Groups27AS/400 Activation Groups27CGI Considerations28Activation Group Problem Examples28Chapter 2. Application Programming Interfaces33APIs for CGI applications34Get Environment Variable (QtmhGetEnv) API35Required parameter group35Error messages36Put Environment Variable (QtmhPutEnv) API36Required parameter group36Error messages37Read from Stdin (QtmhRdStin) API37Required parameter group38Error Messages38Write to Stdout (QtmhWrStout) API39Required parameter group39Error messages39Convert to DB (QtmhCvtDB) API40Required parameter group41Error messages42Parse QUERY_STRING Environment Variable or Post stdindata (QzhbCgiParse) API42Required parameter group43CGII0200 Format45Field descriptions45Error messages46Produce Full HTTP Response (QzhbCgiUtils) API46Error messages48Configuration APIs48Convert URL to Path (QzhbCvtURLtoPath) API48Authorities and locks48Required parameter group49Error messages50Retrieve Directive (QzhbRetrieveDirective) API50Authorities and locks50Required parameter group50Error messages52Retreive a list of all Configuration Names(QzhbGetConfigNames) API52Authorities and locks52Required parameter group52Error messages53Create a Configuration (QzhbCreateConfig) API53Authorities and locks53Required parameter group53Error messages54Delete a Configuration (QzhbDeleteConfig) API54Authorities and locks54Required parameter group54Error messages54Read a Configuration File into Memory (QzhbOpenConfig) API55Authorities and locks55Required parameter group55Error messages56Free a Configuration File from Memory (QzhbCloseConfig) API56Authorities and locks56Required parameter group56Error messages57Search for a Main Directive (QzhbFindDirective) API57Authorities and locks57Required parameter group57Error messages58Search for a Subdirective under Main Directive(QzhbFindSubdirective) API59Authorities and locks59Required parameter group59Error messages60Return Details of a Main Directive or Subdirective(QzhbGetDirectiveDetail) API61Authorities and locks61Required parameter group61Error messages62Add a Main Directive or Subdirective (QzhbAddDirective) API62Authorities and locks62Required parameter group62Error messages64Remove a Main Directive or Subdirective(QzhbRemoveDirective) API64Authorities and locks64Required parameter group64Error messages65Replace a Main Directive or Subdirective(QzhbReplaceDirective) API65Authorities and locks65Required parameter group65Error messages66Server instance APIs66Retrieve a list of all Server Instances(QzhbGetInstanceNames) API66Authorities and locks66Required parameter group66INSN0100 Format67Field descriptions67Error messages67Look up Server Instance Data (QzhbGetInstanceData) API68Authorities and locks68Required parameter group68INSD0100 Format69Field descriptions69Error messages70Change Server Instance Data (QzhbChangeInstanceData) API70Authorities and locks71Required parameter group71Error messages71Create a Server Instance (QzhbCreateInstance) API72Authorities and locks72Required parameter group72Error messages73Delete a Server Instance (QzhbDeleteInstance) API73Authorities and locks73Required parameter group73Error messages74Group file APIs74Create a new Group File (QzhbCreateGroupList) API74Authorities and locks74Required parameter group75Error messages75Read a Group File into Memory (QzhbOpenGroupList) API75Authorities and locks75Required parameter group76Error messages76Free Group File from Memory (QzhbCloseGroupList) API77Authorities and locks77Required parameter group77Error messages77Retrieve the next Group in the Group List(QzhbGetNextGroup) API78Authorities and locks78Required parameter group78Error messages78Locate a named group in a Group List (QzhbFindGroupInList)API79Authorities and locks79Required parameter group79Error messages79Retrieve the Name of a Group (QzhbGetGroupName) API80Authorities and locks80Required parameter group80Error messages80Add a new Group to the end of a Group List(QzhbAddGroupToList) API81Authorities and locks81Required parameter group81Error messages82Remove a Group from a Group List(QzhbRemoveGroupFromList) API82Authorities and locks82Required parameter group82Error messages82Retrieve the next User in the Group (QzhbGetNextUser) API83Authorities and locks83Required parameter group83Error messages83Locate a User in a Group (QzhbFindUserInGroup) API84Authorities and locks84Required parameter group84Error messages85Retrieve the Name of a User (QzhbGetUserString) API85Authorities and locks85Required parameter group85Error messages86Add a new user to the end of a Group (QzhbAddUserToGroup)API86Authorities and locks86Required parameter group87Error messages87Remove a User or Element from a Group(QzhbRemoveUserFromGroup) API87Authorities and locks88Required parameter group88Error messages88Chapter 3. Using Net.Data to Write CGI Programs for You89Overview of Net.Data89Chapter 4. Using Persistent CGI Programs91Overview of Persistent CGI91Named Activation Groups91Accept-HTSession CGI Header91HTTimeout CGI Header92Considerations for using Persistent CGI Programs92Persistent CGI Program Example93Chapter 5. Enabling your AS/400 to run CGI programs95How to enable the server to run CGI programs95Using directives for security and access control96The default fail rule97Explicit CGI enablement97Server runs only CGI programs97CGI program considerations97Chapter 6. Sample programs (in Java, C, and RPG)99Example of Java language CGI program99Example of C language CGI program104Example of RPG language CGI program109Example of a C language server configuration API program115Chapter 7. Writing Server API programs119Overview of the Server API119General procedure for writing Server API programs119Guidelines119Basic server request process120Application functions121HTTP return codes and values123Predefined functions and macros124Return codes129Server API configuration directives130Server API usage notes130Server API directives and syntax130Server API directive variables131Compatibility with other APIs132Porting CGI programs132Authentication and Authorization132Environment variables133Server API variables134Chapter 8. Writing Java Servlets139Overview of servlets139Chapter 9. Using Server-Side Includes141Considerations for using server-side includes141Preparing to use server-side includes141Format for server-side includes142Directives for server-side includes142Chapter 10. Troubleshooting your CGI programs149Chapter 11. Notices155Programming Interface Information156Trademarks156Readers’ Comments — We'd Like to Hear from You159Размер: 548,4 КБСтраницы: 163Язык: EnglishПросмотреть