Start of change

Completing a URIMAP definition for a static response to an HTTP request for CICS as an HTTP server

For a static response, when you have started the URIMAP definition by specifying the components of the expected URL (scheme, host and path) and other basic information, complete the definition by providing the information that CICS® needs to construct the static response to the request, using a document template or HFS file. You can use a wildcard for path matching, where CICS takes the portion of each HTTP request's path that is covered by the wildcard character, and substitutes this as the last part of the template name or HFS file path.

If you have not already planned how to provide a static response to the HTTP request, Providing static HTTP responses with a CICS document template or HFS file tells you how to do this. Then you need to start your URIMAP definition as described in Starting a URIMAP resource definition for any requests for CICS as an HTTP server.
When you have planned your static response and started your URIMAP definition, complete the definition following the instructions in this topic. The CICS Resource Definition Guide has information about the different methods of resource definition, and full reference information about all the URIMAP resource definition attributes that you will use during this process.
Note: Start of change When you deliver items as a static response, basic authentication does not operate. Resource level security cannot be applied to these items. If you need to apply access controls based on a user ID to an item delivered in this way, you need to deliver the material as an application-generated response instead.End of change
  1. Specify the MEDIATYPE attribute as the data content of the static response that CICS provides. For example, text/html or text/xml are the names for HTML and XML data content respectively. (See IANA media types and character sets for more information about media types.) There is no default for this attribute, and it must be specified. CICS creates a Content-Type header for the response using this information.
  2. If the static response is formed from a text document (either a document template or a HFS file), specify the attributes required for code page conversion. Code page conversion only takes place where the MEDIATYPE attribute specifies a text type of data content.
    1. Specify the CHARACTERSET attribute as the character set into which CICS converts the static response before sending it to the Web client. CICS does not support all the character sets named by IANA. HTML coded character sets lists the IANA character sets that are supported by CICS. This information is included in the Content-Type header of the response.
    2. Specify the HOSTCODEPAGE attribute as the IBM code page (EBCDIC) in which the static document is encoded.
  3. If you are using a CICS document template to form the static response, specify the TEMPLATENAME attribute as the name of the document template. The document template must be defined using a DOCTEMPLATE resource definition. If you want to use path matching, include an asterisk as a wildcard character at the end of the name of the CICS document template, and also at the end of the path specified by the PATH attribute. CICS takes the portion of each HTTP request's path that is covered by the wildcard character, and substitutes this as the last part of the template name. The CICS Resource Definition Guide has an example of how this works.

    When the TEMPLATENAME attribute is specified, if a query string is present on the URL, CICS passes the content of the query string into the named CICS document template as a symbol list. This only takes place if the query string has not already been used in the PATH attribute of the URIMAP definition.

  4. If you are using a HFS file to form the static response, specify the HFSFILE attribute as the fully qualified (absolute) or relative name of the file. The HFS file can be specified as an absolute, or fully qualified, path that begins with a slash, or as a relative path that does not begin with a slash. A relative path is relative to the HOME directory of the CICS region userid. The CICS region must have permissions to access z/OS UNIX, and it must have permission to access the HFS directory containing the file, and the file itself. Java™ Applications in CICS explains how to grant these permissions. If you want to use path matching, include an asterisk as a wildcard character at the end of the path for the HFS file, and also at the end of the path specified by the PATH attribute. CICS takes the portion of each HTTP request's path that is covered by the wildcard character, and substitutes this as the last part of the HFS file path. The CICS Resource Definition Guide has an example of how this works.
    Note: You cannot use an asterisk alone in the HFSFILE specification. At least one level of the directory structure must be specified.
    A query string cannot be substituted into a HFS file.
End of change