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.

Since there is no definition of our Web application (CTGTesterCCIWeb) in the<br />

<strong>WebSphere</strong> plugin configuration file (was.conf), then the HTTP request is<br />

automatically sent to the Web container in the J2EE Server, rather than<br />

executing in the <strong>WebSphere</strong> plugin within the HTTP Server address space.<br />

Once the request is mapped over to the J2EE Server, the Web container will<br />

search through all the virtual-host/context-root pairs in its configuration file<br />

(webcontainer.conf) to see if the request matches. If the URL received matches a<br />

virtual-host/context-root pair, then the Web container knows to proceed. If no<br />

match is found, then <strong>WebSphere</strong> will reject the URL. We had the following<br />

definitions in our webcontainer.conf:<br />

host.default_host.alias=wtsc66oe.itso.ibm.com:80,SC66:80,<br />

wtsc66oe.itso.ibm.com:99<br />

host.default_host.contextroots=/<br />

This then is how our Web application functions:<br />

1. <strong>The</strong> first request to our Web application using the URL<br />

http://wtsc66oe.itso.ibm.com:99/CTGTesterECIWeb/ is passed to the Web<br />

container in the J2EE Server.<br />

2. <strong>The</strong> URI CTGTesterECIWeb causes the default welcome page to be loaded,<br />

which is defined in the Web deployment descriptor (web.xml) to be the Java<br />

Server Page (JSP) index.jsp.<br />

3. This index.jsp contains an HTML form that is then used to invoke the servlet<br />

CTGTesterECIServlet.<br />

4. <strong>WebSphere</strong> next goes looking for an application whose defined<br />

servletmapping value matches that implied on the received URL. In this<br />

example, the servletmapping string on the URL is CTGTesterECIServlet, and<br />

it knows this because the servletmapping value is whatever comes after the<br />

context root value on the URL. <strong>WebSphere</strong> looks through the web.xml files<br />

contained in each Web application's WAR file looking for a tag<br />

that matches the servletmapping string on the URL. When it finds one, it<br />

takes the value and goes to the point in the web.xml file<br />

where is defined. This is the class file that is executed. In our<br />

web.xml (Example 10-4), the following servlet mapping was defined.<br />

Example 10-4 web.xml<br />

<br />

<br />

<br />

CTGTesterECIWeb<br />

<br />

CTGTesterECIServlet<br />

CTGTesterECIServlet<br />

Chapter 10. <strong>CICS</strong> TG and <strong>WebSphere</strong> Application Server for z/OS 267

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

Saved successfully!

Ooh no, something went wrong!