306 DB2 for z/OS and WebSphere: The Perfect Couple
return (forward);
}
}
A user action class is an extension of the Action class of the Struts framework. The important
method to consider and to write is
perform. This method has an imposed signature and must
return a forward class. This class will be used by the Action servlet to determine what to do
next. The parameters passed on the call allows access to all required information, including
the request. In our example we process two demands:
򐂰 Text information about the employee
򐂰 Image of the employee
In both sections, after recuperating the params, the session Bean, entry to the model, is
instantiated via a local home interface, and a business method is invoked through the
returned local object. The response object is then stored in the container of the request as an
attribute, which can be easily used by the view (JSP).
11.5 The enterprise J2EE application
All EJB projects and the ItsoWEB1 project are part of the same Enterprise Application
Itso1EAR. In the EJB projects we have defined a JDBC reference to our Data Source. The
name
jdbc/ITSO1 is certainly not the name of the real defined data source in the container.
This linkage, however, can be corrected at deployment time.
In the EAR project we can have a look at the application descriptor file, Application.xml. Open
this file by double-clicking. It also has a specialized editor. In the window that opens, select
the Module tab from the bottom menu (Figure 11-74).
Figure 11-74 Modules in application ItsoEAR1
On the left side, we have the list of all Web and EJB projects included in the EAR project, and
under Project Utility JARs, a list of additional jars with support/utility classes. The Web project
ItsoWeb1 is highlighted, and as a result on the right we find the value of the Context Root,

Get DB2 for z/OS and WebSphere: The Perfect Couple now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.