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.

Figure B-22 init() method<br />

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

public void init(ServletConfig sc) throws ServletException<br />

{<br />

// call HttpServlet init method<br />

super.init(sc);<br />

}<br />

// Set time of loading<br />

loadedDate = new Date();<br />

<strong>The</strong> Web application server invokes the servlet service() method upon receiving<br />

an HTTP request targeted towards that servlet. This method in turn invokes the<br />

appropriate HTTP-specific method based on the type of request.<br />

HttpServletRequest is an input parameter and contains the HTTP protocol<br />

specified header information. HttpServletResponse is an output parameter and<br />

contains an HTTP protocol-specific header and can return HTML data to the<br />

client. In our servlet we defined a doGet() and doPost() method so the servlet<br />

can handle HTTP GET and POST requests. Both methods are identical; they call<br />

the common processRequest() method, which deals with GET and POST<br />

requests in the same way.<br />

<strong>The</strong> initial section of the processRequest() method is shown in Figure B-23 on<br />

page 361.

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

Saved successfully!

Ooh no, something went wrong!