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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

JSPs<br />

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

scenarios can occur:<br />

► <strong>The</strong> request completes successfully<br />

► An error is reported in the ECIRequest object<br />

► An exception occurs inside the <strong>CICS</strong> TG Java class library<br />

348 <strong>CICS</strong> <strong>Transaction</strong> <strong>Gateway</strong> <strong>V5</strong><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-11).<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Figure B-11 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.<br />

<strong>The</strong> page then includes our common JSP header, which displays the information<br />

specified in the initial form, such as <strong>Gateway</strong> daemon URL and user ID. <strong>The</strong> rest<br />

of the page then outputs the values of the request attributes using the scriptlet<br />

format , shown in Figure B-12. In our application, the<br />

JavaBean component returnCode contains the ECI return code, and is inserted<br />

into the HTML output with the JSP scriplet .<br />

<br />

Return Codes <br />

ECI return code:<br />

ECI error msg:<br />

Abend code:<br />

<br />

Figure B-12 Outputting the results into the HTML

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

Saved successfully!

Ooh no, something went wrong!