01.01.2013 Views

CICS Transaction Gateway V5 The WebSphere ... - IBM Redbooks

CICS Transaction Gateway V5 The WebSphere ... - IBM Redbooks

CICS Transaction Gateway V5 The WebSphere ... - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

242 <strong>CICS</strong> <strong>Transaction</strong> <strong>Gateway</strong> <strong>V5</strong><br />

CTGTesterECI<br />

<strong>The</strong> CTGTesterECI enterprise application is a servlet-based Web application that<br />

calls the specified COMMAREA-based <strong>CICS</strong> program and displays the result of<br />

the returned COMMAREA (see Figure 10-3).<br />

Web browser<br />

HTML<br />

JSP<br />

<strong>WebSphere</strong><br />

Application Server<br />

Web container<br />

servlet<br />

CTGTesterECIServlet<br />

<strong>CICS</strong> TG<br />

<strong>CICS</strong> TG<br />

Java<br />

classes<br />

z/OS<br />

Figure 10-3 Application architecture of CTGTesterECI, local mode<br />

<strong>CICS</strong> TS V2.2<br />

EC01<br />

(COBOL<br />

program)<br />

<strong>The</strong> flow of control through the enterprise application is as follows:<br />

► <strong>The</strong> JavaServer Page (JSP) index.jsp contains a form that starts the servlet<br />

CTGTesterECIServlet. Several parameters are sent to the servlet: the name<br />

of the <strong>CICS</strong> program to call, the encoding to use, and details of the <strong>Gateway</strong><br />

daemon, among others.<br />

► <strong>The</strong> servlet makes the call to <strong>CICS</strong> using the ECIRequest class from the <strong>CICS</strong><br />

TG base classes. Once the call has completed, the servlet forwards the<br />

results to one of three JSPs, depending on whether the request was<br />

successful, an error occurred, or an exception occurred.<br />

► <strong>The</strong> JSP formats and displays the results of the request.<br />

This sample enterprise application is supplied in the file CTGTesterECI.ear. To<br />

obtain this file, see Appendix C, “Additional material” on page 389.<br />

C<br />

O<br />

M<br />

M<br />

A<br />

R<br />

E<br />

A

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!