Start of change

Providing a favicon

Many Web browsers automatically make a request for a favicon (favorites icon) when a user visits or bookmarks a Web page. You can provide a favicon as a static response using a URIMAP definition.

Web browsers make requests for default favicons using the URL
http://www.example.com/favicon.ico
where www.example.com is the host name for the site. The HTTPS scheme may be used instead, if appropriate. You can choose to provide:
If a Web browser requests a favicon and you do not provide one, CICS sends an error response to the browser as follows:
  • If you are using the CICS-supplied default analyzer DFHWBAAX, a 404 (Not Found) response is returned. No CICS message is issued in this situation.
  • If you are using the sample analyzer DFHWBADX, or a similar analyzer which is only able to interpret the URL format that was required before CICS TS Version 3, the analyzer is likely to misinterpret the path favicon.ico as an incorrectly specified converter program name. In this case, message DFHWB0723 is issued, and a 400 (Bad Request) response is returned to the browser. To avoid this situation, you can either modify the analyzer program to recognize the favicon request and provide a more suitable error response, or provide a favicon using a URIMAP definition (which means that the sample analyzer program is bypassed for these requests).

To provide a favicon for all or some of your host names, using a URIMAP definition:

  1. Create the favicon and store it in a suitable location on z/OS® UNIX System Services HFS.
    1. You can create the favicon using an icon editor package, or use an icon converter program to convert an image created in another format.
    2. The favicon must be 16 by 16 pixels. Browsers may ignore favicons that are not the correct size.
    3. The favicon must be saved in Windows icon format (.ico file extension), and named favicon.ico.
    Most Web servers need to store the favicon in the root directory for the host name. For CICS, a URIMAP definition can provide a favicon stored anywhere on HFS. 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.
  2. Create a URIMAP definition to provide the favicon as a static response. Starting a URIMAP resource definition for any requests for CICS as an HTTP server and Completing a URIMAP definition for a static response to an HTTP request for CICS as an HTTP server guide you through the process of creating a URIMAP definition. The following sample URIMAP definition attributes could be specified to provide a favicon for all host names used by the CICS region:
    	Urimap       ==> favicon        - URIMAP name
    	Group        ==> MYGROUP        - Any suitable
    	Description  ==> Favicon     
    	STatus       ==> Enabled     
    	USAge        ==> Server         - For CICS as HTTP server
    UNIVERSAL RESOURCE IDENTIFIER 
    	SCheme       ==> HTTP           - Will also match HTTPS requests
    	HOST         ==> *              - * matches any host name.
                                            Specify host name if you
                                            provide different favicons
    	PAth         ==> /favicon.ico   - Browsers use this path to
                                            request favicons
    ASSOCIATED CICS RESOURCES
    	TCpipservice ==>                - Blank matches any port
    STATIC DOCUMENT PROPERTIES
    	Mediatype    ==> image/x-icon   - This media type is suitable
    	HFsfile      ==> /u/cts/CICSHome/favicon.ico
                                            - Location of favicon in HFS
    Note: Code page conversion is not required for a favicon, so do not specify the CHARACTERSET or HOSTCODEPAGE options.
End of change