您可以运行 Web 示例,了解 Java 程序可如何使用 CICS Web 支持与 Web 浏览器进行交互。
本示例说明了如何使用 JCICS Web 和文档类。通过 Web 浏览器访问此示例应用程序。该示例会获取有关入站客户机请求、HTTP 头和事务的 TCP/IP 特性的信息。该信息会写入标准输出流 System.out,并插入响应文档。同时也会获取有关文档的信息,该信息会写入 System.out,并插入响应文档。然后,会将响应文档发送至客户机。
本示例使用以下 Java 类和程序:
程序 | Java 类 |
---|---|
DFJ$JWB1 | Web.Sample1 |
Web Sample1 Inbound Client Request Information: Method: GET Version: HTTP/1.1 Path: /cics/cwba/jcicxsa1 Request Type: HTTPYES Query String: null HTTP headers: Value for HTTP header User-Agent is 'Mozilla/4.75 €en€ (WinNT; U)' Browse of HTTP Headers started Name: Host Value: winmvs2d.hursley.ibm.com:27361 Name: Connection Value: Keep-Alive, TE Name: Accept Value: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Name: Accept-Encoding Value: gzip Name: Accept-Language Value: en Name: Accept-Charset Value: iso-8859-1,*,utf-8 Name: Cookie Value: PBC_NLSP=en_US Name: TE Value: chunked Name: Via Value: HTTP/1.0 sp15ce18.hursley.ibm.com (IBM-PROXY-WTE-US) Name: User-Agent Value: Mozilla/4.75 €en€ (WinNT; U) Browse of HTTP Headers completed TCPIP Information: Client Name: sp15ce18.hursley.ibm.com Server Name: winmvs2d.hursley.ibm.com Client Address: 9.20.136.28 ClientAddrNu: 9.20.136.28 Server Address: 9.20.101.8 ServerAddrNu: 9.20.101.8 Clientauth: NO SSL: NO TcpipService: HTTPNSSL PortNumber: 27361 Document Information: Doctoken: 33 92 112 0 0 0 0 1 64 64 64 64 64 64 64 64 Docsize: 2762
Sample1 started Method: GET (3) Version: HTTP/1.1 (8) Path: /cics/cwba/jcicxsa1 (19) Request Type: HTTPYES Value for HTTP header User-Agent is 'Mozilla/4.75 en (WinNT; U)' HTTP headers: Name: Host (4) Value: winmvs2d.hursley.ibm.com:27361 (30) Name: Connection (10) Value: Keep-Alive, TE (14) Name: Accept (6) Value: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* (67) Name: Accept-Encoding (15) Value: gzip (4) Name: Accept-Language (15) Value: en (2) Name: Accept-Charset (14) Value: iso-8859-1,*,utf-8 (18) Name: Cookie (6) Value: PBC_NLSP=en_US (14) Name: TE (2) Value: chunked (7) Name: Via (3) Value: HTTP/1.0 sp15ce18.hursley.ibm.com (IBM-PROXY-WTE-US) (52) Name: User-Agent (10) Value: Mozilla/4.75 en (WinNT; U) (28) Client Name: sp15ce18.hursley.ibm.com (24) Server Name: winmvs2d.hursley.ibm.com (24) Client Address: 9.20.136.28 (11) ClientAddrNu: 9.20.136.28 Server Address: 9.20.101.8 (10) ServerAddrNu: 9.20.101.8 Clientauth: NO SSL: NO TcpipService: HTTPNSSL PortNumber: 27361 Doctoken: Doctoken: 33 92 112 0 0 0 0 1 64 64 64 64 64 64 64 64 Docsize: 2762 Sample1 complete