Level: Introductory Juan Rodriguez (juanrodr@us.ibm.com), Consulting IT Professional, IBM
01 Mar 2003 This article describes how to integrate host legacy applications (also known as 3270 host applications) into a portal solution using the WebSphere Portal product. There are many ways to accomplish this task of bringing old-world applications into the new Web world. This article introduces two options that let you "portalize" legacy applications quickly and reliably using the IBM WebSphere Host On-Demand portlet and IBM WebSphere Host Publisher portlet. This article refers to 3270 CICS applications and transactions, but in many cases the portlets described will also support access to iSeries 5250 applications and VT applications.
About the Host On-Demand portlet
The fastest way to access your host legacy applications from a portlet is to use the Host On-Demand portlet, along with the WebSphere Host On-Demand product. WebSphere Host On-Demand uses the Java environment, industry-standard TN3270, TN5250, VT, SSL, and other standard Internet protocols to provide secure, platform-independent host access from a Web browser. The most commonly used clients are display and printer sessions for 3270 and 5250, VT terminals, and FTP clients.
Figure 1 shows a sample configuration where the Host On-Demand portlet is used to access mainframe CICS applications.
Figure 1. Sample scenario with Host On-Demand portlet

Host On-Demand server
The main task of the Host On-Demand server is to provide the Java applet to be downloaded to the client. This requires a Web server to be installed on the same machine. You can use the Host On-Demand Deployment Wizard to define sessions, and to create the portlet and its associated configuration values.
If the configuration created by the Deployment Wizard is an HTML-based model, the definitions for all the sessions are stored in HTML format and the configuration files are stored in the HODData directory. This type of configuration does not require the Host On-Demand Service Manager to validate the user inside the Host On-Demand server.
The Host On-Demand server provides administrative functions to manage users, groups, and set data, depending on the client user session configuration. Services such as redirector, OS/400 Proxy Server, and licenses are also managed by the Host On-Demand server.
Host On-Demand clients
The Host On-Demand clients have various configuration options that can be set on the server. During runtime, the user can change most of the options unless they have been locked by the administrator. Two of the options have quite an effect on the way the client works:
-
Client receive method
- Depending on the setting of this option, there are two client types:
- Host On-Demand cached client: the components will be stored on the user's machine, avoiding extra downloads in the successive use of the session. This is the Host On-Demand recommended method because startup is faster and it makes the best use of the network.
- Host On-Demand download client: transfers the client runtime code from the Host On-Demand sever each time the Host On-Demand client is started.This leads to more network traffic, but there is no need to write any software or data on the client machine.
-
Client execution or run method
- This setting defines the mode in which the applet runs:
-
Embedded mode: the Host On-Demand applet runs inside the browser window, and when using the Host On-Demand portlet in the portlet page area.
-
Separated mode: the emulation session runs on a separate window; it will not run inside the browser window or the portlet area. In some cases, this mode can give you more flexibility to change the size of the emulation session window, but all other functions will still work in the same way.
Host On-Demand provides several types of preconfigured clients. You can use the Deployment Wizard to create a custom emulation client with all the components and features you want to make available to the user. Figure 2 shows an example of a client applet with a selection of configured sessions as it is displayed in a browser.
Figure 2. Configured Host On-Demand client with selection of sessions

Deployment Wizard
The Deployment Wizard lets you configure every function necessary for your environment. You can define which type of sessions, functions, and components will be available to the user. The result is typically an HTML page. You can also use the tool to create a customized portlet.
Screen Customizer
Screen Customizer/LE for Host On-Demand is an alternative graphical user interface (GUI) that lies over your host application window, and makes it look like a Windows application. It produces the Host On-Demand green screen (the traditional screen with a black background and bright green text) with a three-dimensional look and feel. Many people who are unfamiliar with the green screen find the Screen Customizer/LE GUI more user-friendly and familiar. The Screen Customizer interface is enabled during the session configuration.
Downloading Host On-Demand portlet
You can download the Host On-Demand portlet from the
portlet catalog on the WebSphere Portal Web site.
Make sure you download the portlet version for the WebSphere Portal release you are using.
As an alternative, you can get the portlet by using the Host On-Demand Deployment Wizard. If you want to install it on your machine, you must:
- Access the Host On-Demand CD
- Navigate to HOD\depwiz
- Run setupDW.exe
Creating a Host On-Demand portlet
If you have a full install, you need to start the wizard by selecting IBM Host On Demand>Administration>Deployment Wizard. As an alternative, if you have only installed the Deployment Wizard, select IBM Deployment Wizard>Host On Demand Deployment Wizard.
Figure 3 shows the panel you use to select the option Create a new HTML file, even if you really want to create a portlet. In the following panels, you will be prompted for options and properties.
Figure 3. Deployment Wizard welcome screen

Figure 4 shows the Session panel, including the session properties window for the selected session. Notice that options can be locked by the administrator, and these values cannot be changed by the user.
Figure 4. Session properties

Some of the more important values are:
- On the Host Sessions panel, to add a 3270 Display and a 5250 Display host session:
- Select a host type from the drop-down list.
- Click Add. Note that the wizard will not let you proceed unless a session is added.
- Select the new session, such as 3270 Display, from the list and click Properties.
- As shown in Figure 5, from the Properties panel of the 3270 session navigate to the Advanced tab and set Start in Separate Window to No. Select this option because you want to keep the emulation session inside the portlet page; otherwise, a new window will open outside of the portal page.
Figure 5. Advanced session properties

Figure 6 below shows the required options you must configure to successfully generate your portlet:
- Complete Page Title, which indicates the portlet title. This value is required.
- The Output Portlet option should be selected.
- Select the WAR Format; by default, the older PAR format is preselected.
- For HOD server URL, enter the URL where the Host On-Demand server is installed. This information is required in order to find the HOD applet at runtime.
Figure 6. Final screen of Deployment Wizard

In Figure 6 you can also click Details... to review all the portlet settings. Once you click Create File(s), the wizard creates the WAR file based on your input values.
Installing the Host On-Demand portlet
Now log on as administrator (the default is wpsadmin) in Portal Server and install the portlet by clicking
Portal Administration>Portlets>Install Portlets.
Once the portlet is installed, click
Portal Administration>Security>Access Control List
to set the appropriate access rights. Only the view permit is required. You can see in Figure 7 that we gave this permission to all authenticated users.
Figure 7. Portlet access list

In this example, a new panel named Host Applications is created and the Host On-Demand portlet is added to this panel. Figure 8 shows the Host On-Demand portlet configured to run in embedded mode within the portlet area.
Figure 8. Host On-Demand portlet: available sessions

Once the session is started, the host application displays its content in the portlet area, as shown in Figure 9.
Figure 9. Host On-Demand portlet showing the CICS host application

By right-clicking the session icon (in Figure 8), the user can change some of the settings not locked by the administrator. The options are shown in Figure 10 below.
Figure 10. User settings

In Figure 10, the Screen Customizer component has just been enabled, meaning that the application is no longer displayed as a plain host application. Screen Customizer will render the output content to approximate the look and feel of a Web application. The portlet using Screen Customizer is shown in Figure 11.
Figure 11. Sample scenario with Screen Customizer

Some Host On-Demand considerations
When working with the Host On-Demand portlet, consider the following miscellaneous items:
- Only one Host On-Demand portlet can run for one user, but it can have multiple sessions.
- Since Host On-Demand is an applet, a portal logoff isn't enough to disconnect already-connected sessions. If the user returns to the portal server again, then the Host On-Demand sessions will appear in the very same state they were before logging off. If Host On-Demand is configured in detached mode, the applet will even remain active if the user logs off from the portal.
- The active sessions remain connected until the user disconnects, the host ends the connection, or the user closes the browser.
- To learn more about the base Host On-Demand product, see Resources.
Host Publisher portlet
The IBM Host Publisher portlet lets you integrate applications created in IBM Host Publisher with IBM WebSphere Portal Server. Using the provided portlet gives you the benefit of providing legacy application content along with Web-based portal content. The portlet also leverages some of the capabilities provided by Host Publisher. For example, you can combine information from different legacy applications and present them within the same portlet.
A key feature of the Host Publisher portlet is that it provides state management. You can have a portlet that interacts with existing legacy applications without losing the connection to the session when users navigate to other portlets, or pages within WebSphere Portal Server.
Figure 12 shows the configuration used in the scenarios in this section, where the Host Publisher portlet is used to access mainframe (CICS) applications.
Figure 12. Using the Host Publisher portlet: sample scenario

Host Publisher components
There are two major components of WebSphere Host Publisher: the Host Publisher Studio (application development tool), and the Host Publisher Server (runtime). This section briefly describes some of the most important functions related to the Host Publisher portlet.
-
Host Publisher Studio
- A collection of task-oriented, easy-to-use GUIs that assist the Web application builder in managing and creating Web-to-host publishing projects. It uses task-oriented prompts to guide the user through the creation process, including recording host and database interactions, identifying desired data, and labeling that data for retrieval.
Host Publisher Studio automatically generates JavaBeans called Integration Objects, which encapsulate the interactions and data retrieval logic. You can use Host Publisher Studio to generate fully customizable Web pages for modeling interactions with the Integration Objects and rendering the resulting data. You can enhance the generated Web pages with your favorite Web authoring tool, such as WebSphere Studio Application Developer (Application Developer).
-
Host Publisher Server
- Provides the runtime environment for supporting J2EE applications created with Host Publisher Studio. Running on the application server with the IBM WebSphere Application Server product, it includes components such as connection management, license monitoring, runtime administration, express logon, XML Gateway, and log and trace management.
Creating Host Publisher applications
Because this topic leads beyond the subject of the article, this section gives you only a brief overview. You can follow the steps to develop a very simple sample application to access a CICS transaction. See Resources for links to more in-depth information about Host Publisher and its components.
The following are recommended steps to create a Host Publisher application.
Steps 1 to 3 are discussed in Host Access.
- Create the Connection Pool.
- Create the Integration Object, including the connect, data, and disconnect macros.
- Generate and save the Integration Object.
Steps 4 to 6 are discussed in Application Integrator.
- Import the Integration Object into the Application Integrator in Host Publisher Studio to create an application using JavaServer Pages (JSP) components.
- Create the application JSP components -- input, output, and error pages.
- Create the enterprise application in an EAR file.
Steps 7 to 9 are covered in Using WebSphere Studio for further development.
- Import the application EAR file into Application Developer.
- If required, use Application Developer to improve the look and feel of the Host Publisher application.
- Test your application in the Application Developer Test Environment.
- Deploy your application into WebSphere Application Server.
- Execute the final version of the application.
Host Access
The Host Access tool, as shown in Figure 13 below, helps you create Integration Objects and connection pools. Connection pooling is an option when using host Integration Objects in IBM WebSphere Host Publisher. By default, Host Publisher uses non-pooled connections (dedicated connections).
When a user requests information from a host access Integration Object on a Web page, Host Publisher connects to the host, logs on, extracts the information, and logs off. To reduce the time it takes to return information, Host Publisher lets you keep pooled connections in place once the application that requested a connection is no longer communicating.
Figure 13. Host Access Studio: Connection Pool

Based on the connection pool that was previously defined, you can use the Host Access tool to build the Integration Object, including the connect, data, and disconnect macros. During this activity, the interaction with the host system is recorded, screens are identified, and required input is defined. Figure 14 shows the main path for a simple Integration Object. The created sample application is an inquiry for an account number in a credit account application running in a CICS host application.
Figure 14. Integration Object for a simple application

Once the Integration Object JavaBean is created, the next step is to create an application using the Application Integrator of IBM Host Publisher Studio.
Application Integrator
Click Create Application to start the Host Publisher development. Follow the wizard's prompts to specify the options for the JSP components and define the Integration Objects properties. You will need to create an input form that includes:
- The required input fields
- An output page to execute the Integration Object JavaBean and display the results
- An error page to display any problems.
When you finish with this wizard, you will have the input, output, and error JSP components required by the Host Publisher application.
The results of this sample scenario are shown in Figure 15. The created input page includes the input form used to post the output page, once the user enters the required input fields and submits the request.
Figure 15. Application Integrator JSP components

From this panel you can edit the JSP components, and provide a more user-friendly interface for the application. Changes in the following areas may be included:
- Font
- Style
- Alignment of the text to be displayed in the page
- Elimination of the blank rows in tables
- Images
Finally, IBM Host Publisher Studio creates an EAR file that can be deployed or fed into a tool such as WebSphere Studio.
Using WebSphere Studio for further development
WebSphere Studio is an excellent tool to update JSP components developed with Host Publisher Studio. It lets you define a test environment where you could run and verify any updates you make to the application, without needing to deploy the application into a Host Publisher server. WebSphere Studio also provides a debugging facility you can use in case of problems.
The EAR file generated by Host Publisher Studio can be imported into WebSphere Studio. The imported Host Publisher EAR file is shown in Figure 16, where the application input page (pagein.jsp) has been selected. The page can now be updated with new or altered features.
Figure 16. Updating a Host Publisher page in WebSphere Studio

Once you're done with additional enhancements to the Host Publisher application pages, you can locally run the application using the WebSphere Test Environment provided by WebSphere Studio.
Host Publisher Server servlets
Host Publisher Studio provides two servlets that let you create and enable a Host Publisher test environment. The servlets, which are used to start and stop the Host Publisher Server instance in the WebSphere Studio test environment, are:
-
StartHPRTE.java
- Initializes and starts the Host Publisher Server instance.
-
StopHPRTE.java
- Stops the Host Publisher Server instance.
You need to add these servlets to a new project for execution. The servlets can be found in the \HostPub\SDK\Server\* directory. Figure 17 shows the installed Host Publisher servlets in WebSphere Studio.
Figure 17. Installed Host Publisher servlets

Executing Host Publisher applications
First, make sure that the WebSphere Test Environment is started. Then start Host Publisher by right-clicking the StartHRPRTE.java servlet and select Run on Server, as shown in Figure 18.
Once Host Publisher is available to run applications, start your application.
Figure 18. Running a Host Publisher application in WebSphere Studio

The applications will now run in the browser pane of WebSphere Studio, typically located in the upper right area of the workbench.
Figure 19. Integration Object results from output page

Setting up the Host Publisher portlet
Once you have installed your Host Publisher application, you need to make sure it can be accessed through WebSphere Portal Server. You will then be ready to set up the Host Publisher portlet.
Downloading, installing, and configuring the portlet
The Host Publisher portlet is available from the portlet catalog on the
WebSphere Portal Web site. Search for Host Publisher. In the resulting list, make sure you select the proper version of the portlet to match your version of WebSphere Portal and Host Publisher.
The portlet is delivered as a WAR file. You log on as administrator (wpsadmin) in Portal Server and install the portlet by clicking Portal Administration>Portlets>Install Portlets.
Once the portlet is installed, navigate to Portal Administration>Security>Access Control List to set the appropriate access rights. To define the Host Publisher application to access the portlet, an edit permit is required. Figure 20 shows that all authenticated users are granted permission to use the portlet.
Figure 20. Access Control List

The WebSphere Portal administrator must add the portlet to a new or existing page. In this example, the portlet is added to the previously created page with name Host Applications. As shown in Figure 21, when this page is selected for the first time, the user has to go into edit mode (and therefore, must have edit rights) to configure the Host Publisher portlet.
Figure 21. Host Publisher portlet before editing

In the editing window, the user must enter the URL of the requested Host Publisher application. The user must also enter user ID and password if basic authentication is used, as shown in Figure 22.
Figure 22. Portlet edit window

Once the Host Publisher portlet is configured, the Host Publisher application appears in the portlet area. As shown in Figure 23, use the Reset Host Publisher Portlet button to restart the application whenever the host session is in an undefined state, such as when network problems are encountered.
Figure 23. Host Publisher portlet showing a CICS transaction

Host Publisher portlet limitations
The Host Publisher portlet requires that WebSphere Portal be installed. The Host Publisher portlet enables the user to run Host Publisher applications, which require the full installation of WebSphere Host Publisher.
The following limitations apply to this version of the Host Publisher portlet:
| Limitation | Comments | | Express Logon Feature (ELF) is not supported | In this environment, Host Publisher Server does not have direct access to the required client certificate. | | Secure Sockets Layer (SSL) restrictions | A secure session cannot be established directly (end-to-end) from the browser to the Web server in the Host Publisher Server machine. But, you can establish an SSL session from the browser to the Web server in the WebSphere Portal Server machine and, optionally, enable a second SSL session from the Portal Server to the Host Publisher Server. | | NLS restrictions | The Host Publisher portlet is in English only. | | Supports HTML content only | You can use transcoding to support other markup languages such as WML (for WAP devices) and cHTML (for i-Mode devices). |
About the author  | |  | Juan R. Rodriguez is a Consulting IT professional at the IBM International Technical Support Organization (ITSO) Center in Raleigh, North Carolina. He received his Master of Science degree in Computer Science from Iowa State University. He writes extensively and teaches IBM classes worldwide on such topics as networking, Web technologies, and information security. Before joining the IBM ITSO, he worked at the IBM laboratory in the Research Triangle Park (North Carolina, USA) as a designer and developer of networking products. You can contact him at juanrodr@us.ibm.com.
|
Rate this page
|