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.

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

private void dropConnection()<br />

{<br />

// tidy up the interaction and connection and set our references to<br />

// null.<br />

try<br />

{<br />

eciInt.close();<br />

eciConn.close();<br />

}<br />

catch (Exception e)<br />

{<br />

e.printStackTrace();<br />

}<br />

eciInt = null;<br />

eciConn = null;<br />

}<br />

Figure B-42 Closing the connection to <strong>CICS</strong><br />

JSPs<br />

<strong>The</strong> application uses two JSPs to format and display the results. One of two<br />

scenarios can occur; the request completes successfully, or an exception occurs<br />

inside the <strong>CICS</strong> ECI resource adapter or our code. <strong>The</strong> JSPs are stored in the<br />

CTGTesterCCIWeb enterprise application project in <strong>WebSphere</strong> Studio, under<br />

the webApplication folder.<br />

results.jsp<br />

<strong>The</strong> JSP results.jsp processes successful completion of a request. <strong>The</strong> JSP<br />

defines the title of the HTML page and the style sheet used to format the HTML<br />

in the header. <strong>The</strong> JSP defines the JavaBeans components that the page uses to<br />

format and display the results (Figure B-43).<br />

<br />

<br />

<br />

<br />

<br />

Figure B-43 JavaBeans components used by results.jsp<br />

<strong>The</strong>se components are all in the request scope and are all String objects. <strong>The</strong>ir<br />

IDs correspond to the names of the attributes we set in the HttpRequest in our<br />

servlet. <strong>The</strong>y contain the result of the <strong>CICS</strong> request made by the servlet.

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

Saved successfully!

Ooh no, something went wrong!