314 IBM WebSphere Host Publisher Version 3.5
For each field displayed as normal text, you will need to specify a proper label to
be used. For example, Figure 10-17 illustrates how you will enter a label to
describe the output field.
Figure 10-17 Providing a label for the plain text
Figure 10-18 shows the defined controls and labels for the output fields in this
sample application.
Figure 10-18 Output fields with defined controls and labels
Chapter 10. Creating applications 315
Figure 10-19 illustrates the created output page. The JSP executes the setter
methods, then invokes the Integration Object (a Java Bean) and executes the
getter methods to obtain the output values.
Figure 10-19 Output page
Step 15: Preview your pages
In this step, you can optionally preview the created JavaServer Pages. However,
keep in mind that the imported Integration Object(s) will not be executed.
Therefore, the output field results will just be blank fields.
Note: To see the pages with actual data, you will need to transfer and deploy the
application in a supported WebSphere Application Server.
<%@ page contentType="text/html;charset=ISO-8859-1" %>
<jsp:useBean id="Hobj01" type="IntegrationObject.Hobj01"
class="IntegrationObject.Hobj01" scope="request">
<jsp:setProperty name="Hobj01" property="*" />
<% Hobj01.setHPubErrorPage("Error.jsp"); %>
<% Hobj01.setHPubStartPoolName("hpool01"); %>
<% Hobj01.doHPTransaction(request, response); %>
if (Hobj01.getHPubErrorOccurred() != 0) {
// Error page redirection already done by IO
<P>Address: <%= Hobj01.getAddressOut() %>
<P>Account Number: <%= Hobj01.getAccountOut() %>
<P>First Name: <%= Hobj01.getFirstnameOut() %>
<P>Last Name: <%= Hobj01.getSurnameOut() %>
316 IBM WebSphere Host Publisher Version 3.5
Figure 10-20 Previewing the pages
Step 16: Create an error page
This is also an optional step. However, it is always recommended that you create
an error page. This page will help you to identify any problems in your Host
Publisher application. Figure 10-21 shows the option to create this page.
Figure 10-21 Creating an error page
Chapter 10. Creating applications 317
Step 17: Customize your pages
After the Host Publisher Studio creates the JSP files, the application can be
deployed to your users. At this point, the pages of the application will be very
plain and simply display the data you request from the host. In most cases, the
developer will want to do some further customization to the files to produce the
desired look and feel for the Web application. You may want to edit the files in
another editing application designed to create Web pages and then import those
pages back into the Studio in order to deploy them.
Figure 10-22 shows the created input, output and error pages. It also illustrates
the Integration Object with the methods used (setters, getters and execution).
Figure 10-22 Host Publisher Studio
318 IBM WebSphere Host Publisher Version 3.5
Step 18: Save the application
The final step is to save your application (see Figure 10-23) in the Host Publisher
Studio. Once this is done, your application will be ready to be transferred to the
Host Publisher Server for deployment.
Figure 10-23 Saving your application
For information about how to transfer and deploy your created applications, see
Chapter 13, Publishing applications on page 359.

Get A Comprehensive Guide to IBM WebSphere Host Publisher Version 3.5 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.