Java 프로그램이 CICS 웹 지원을 사용하여 웹 브라우저와 상호 작용하는 방식을 이해하려면 웹 예제를 실행합니다.
이 예제는 JCICS 웹 및 문서 클래스를 사용하는 방법을 보여줍니다. 웹 브라우저에서 이 예제 애플리케이션에 액세스합니다. 트랜잭션의 인바운드 클라이언트 요청, 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