334 IBM WebSphere Host Publisher Version 3.5
11.6.2 The interactive composite application
Once you have created the host Integration Objects, you will be able to create the
Web application using the Host Publisher Studio. In this scenario, the two
Integration Objects (inquiry and update) are used as independent JavaBeans to
generate information for two different HTML pages presented to the Web user.
This will illustrate the simplest way to create an interactive Web application that
can display and update data maintained by a legacy host (in our case CICS)
application. We use the existing application logic to create a new user interface.
As illustrated in Figure 11-5 on page 328, three Web pages are created:
1. Update_p1 prompts the user to enter an account number.
2. Update_p2 displays account information and prompts the user to modify
fields he wants to change.
3. Update_p3 returns a message confirmation that the update was successful.
All account fields are presented to the user in edit boxes. All fields can therefore
be modified, including the account number and the last name.
Getting started
You can start by creating a new Web application using the Host Publisher Studio
and selecting File -> New Application... in the Studio’s main window. Clicking
the Next button in the sequence of definition windows will guide you through the
process of setting up the environment to create the application.
In the scenario, the new application is named Update and if you select the option
I prefer to start with data, you will have to open the host Integration Objects that
were previously created (import). As the final step of this introductory phase, one
would normally create an error (HTML) page to be sent to the Web user in case
something goes wrong. However, for simplicity, this last step is omitted in this
sample scenario.
Creating the HTML page: displaying account information
You can start with the application’s second page Update_p2 (display account
details). Click Create -> HTML page and follow the sequence of windows. It is an
execution page and you have to add the Integration Object Wproj1 to this page,
using the sequence of windows shown in Figure 11-10 on page 335.