HATS in WebSphere Portal

 

Content

  1. Overview
  2. Create a base HATS application
  3. Generate portlets from HATS applications
  4. Work with a HATS portlet
  5. Export your HATS portlet
  6. portlet considerations and limitations

 

Overview

HATS applications can now run directly within WebSphere Portal as portlets, enabling WebSphere Portal and HATS to interact directly. HATS Business Logic classes are able to use the WebSphere Portal APIs, and HATS JSPs are able to include WebSphere Portal JSP tag libraries.

A HATS portlet project is targeted at transformation oriented applications.

To allow a HATS project to run as a portlet, the structure and content of the HATS project must be altered to meet the portlet specification. The HATS studio automates the process of converting a regular HATS project into a portlet. The WebSphere Portal Toolkit is a prerequisite for this conversion process. The toolkit must be installed on the same machine as HATS Studio.

Before or after installing the Portal Toolkit, download and install the latest HATS Refresh Pack.

There a 2 ways in which one can generate a HATS portlet:

  1. You can create a new one using the HATS Create a Project wizard and designating that the project should be created as a portlet.
  2. You can generate one from an existing HATS application. This ensures that the time spent on creating your HATS application will not be wasted when one moves it to WebSphere Portal.

    For existing HATS V4 applications, migrate your application to HATS V5 before generating your portlet.

For more information, see Using IBM WebSphere Host Access Transformation Services V5

 

Create a base HATS application

To create the base HATS application, follow these steps:

  1. Start HATS Studio...

    Start | Programs | IBM WebSphere HATS | HATS Studio

  2. In the white space area of the HATS Project View, right-click and select New HATS Project.

  3. The Create a Project wizard opens. In the Create a Project panel, type the name for the new HATS project and a description for the project. You may want to change the name of the Enterprise Application project name. The default is HATS.ear. The name that you enter is also shown in the WAS when the application is deployed on WebSphere. Click Next.

  4. In the Create a Project - Connections Settings window, specify the connection properties for the HATS application. For Host name, we specify iseriesd.dfw.ibm.com and for Type, we select 5250. For the other settings, leave the default values. Click Next.

    You can edit connection properties in the project setting view.

  5. On the Create a Project - Select Default Template window, select the template you want to use. We select Swirl.jsp. Click Finish.

    The HATS Project Wizard completes the creation of the HATS project. You see the new HATS project in the HATS Project View of HATS Studio.

 

 

Generate portlets from HATS applications

To generate your portlet from an existing HATS project, right click on your project in the HATS Project View and select Generate Portlet. A dialog will be presented, allowing you to designate the name for the new project and select the types of files that will be automatically converted during the creation. A HATS portlet project will be created from the selected project. Once the portlet is created, additional customization can be done.

To generate a portlet when creating a new HATS application, select HATS > New > Project on the HATS Studio toolbar to launch the Create a Project wizard. Select the Create as Portlet check box on the first panel of the wizard then finish creating your project as normal. This will generate a single HATS portlet project although the HATS .ear will not be created in this case. This function is available so that you do not have to create a regular HATS application, then generate a protect from it.

Generate a HATS portlet

 

 

Work with a HATS portlet

A HATS portlet project is still a HATS project meaning all the HATS wizards and editors can continue to be used on the project. A HATS portlet project is also a portlet project which also means all the WebSphere Portal Toolkit editors and runtime configuration can be used on the project. A HATS portlet project appears in the tree with a different icon . When working with a HATS portlet, there are a few things consider:

 

Export your HATS portlet

To export a HATS portlet for deployment, you can use the built in WebSphere Studio Export wizard. Select...

File | Export | WAR file | Next

Select the desired portlet project from the Web Project drop-down list and enter the target file name for the exported WAR in the Destination drop-down. Click Finish.

Once you have exported your HATS portlet, you will need to install it into WebSphere Portal using the Administrative Portlets.

 

HATS portlet considerations and limitations

The following is a list of considerations and limitations when dealing with HATS portlets:

For more information and help regarding the WebSphere Portal Toolkit, select the Help drop-down menu on the HATS Studio toolbar and pick Help Contents. Click Portlet developer information from the help list on the left to access documentation for portlet developers.

 

Home