Preparing your HATS project for use as a Web application
After you develop a HATS project, follow these steps to convert the project to a WebSphere application and make it ready for use on a server:
- Assemble the project into a J2EE application.
- Transfer the application to a server.
Note: The terms "HATS application", "WebSphere application", and "J2EE application" can be used interchangeably to refer to an application created from a HATS project. It is a HATS application because it was developed in the HATS Studio. It is a WebSphere application because it will be installed and run on WebSphere Application Server. It is a J2EE application because it conforms to the J2EE standards.
Assembling the project into an application
You have created a HATS project and customized it to provide a usable representation of your host application. Perhaps you even brought in some users to review the application's appearance. Now you're satisfied with the way the project looks and functions, and you're ready to put it into production on a Web server.
Your next step is to assemble the project into a J2EE application. You must decide whether to store a copy of the application .ear file on your local machine, or export it directly to your WebSphere Application Server machine. To export it directly to your WAS machine, map a network drive to that machine so that it appears to be local to your Studio machine.
To assemble the project into an application,...
- Highlight (single-click) the name of your project in the HATS Project View.
- Click the Assemble HATS Project
icon on the main tool bar, or right click the project name and select Assemble HATS Project.
- In the Export window, choose an Enterprise Application project from the drop-down list or type the name of an Enterprise Application project in the EAR Project field.
- Enter a destination location in the Destination field or click the Browse button to select the destination of the exported .ear file.
- If you want to export the project's source files along with the executable files, check the Export source files box. If you include the source files, another developer can extract them from your .ear file. This can make collaboration or service easier, but decide whether it creates a security risk.
- If you have exported this project to this location before, the export process asks whether you want to overwrite the existing files. This is intended to protect you from overwriting files that you might want to keep, perhaps to archive a previous version of your project. If you want to overwrite previous files without being asked for confirmation, check the Overwrite existing file box.
- To maintain project names and external classpath dependencies, which are useful for later importing the EAR into binary projects, check the Include project build paths and meta-data files box. Selecting this option will only allow binary projects to be created if they are imported later.
- Click Finish. The project is assembled into a J2EE application, represented by an Enterprise Archive file with extension .ear, with the directory and file name you specified.
Grouping your applications
You can group your HATS applications together in one .ear file, or store each in its own separate .ear file. These options are discussed in HATS User's and Administrator's Guide. Be sure your HATS applications are grouped in the way you want before you install them to WebSphere Application Server.
Installing the application on a server
After assembling the HATS project, install the ear file by launching the WebSphere administrative console and browse to the location of the application's.ear file. For additional information on installing applications on WebSphere Application Server please refer to the WAS Information Center. Once the application has been installed, test it by bringing up the URL in a Web browser on another computer. Then you can publish the URL to your users.
Note:There can be implications installing the .ear file on a zSeries WAS server. If you use WebSphere administrative console and browse to a local copy of the file, it is likely that on your zSeries WAS you will receive the following error:
- BBOO0271E HTTP REQUEST EXCEEDED 10485760 BYTE INPUT BUFFER
The explanation for this message is:
- BBOO0271E HTTP REQUEST EXCEEDED dstring BYTE INPUT BUFFER
- Explanation: Controller could not read entire HTTP request, input buffer exceeded.
- User Response: Increase the value specified on the protocol_http_large_data_inbound_buffer variable and restart the server. If installing an application, try installing locally from the server.
The default buffer is not large enough for HATS applications. It is possible to increase this variable, and then use WebSphere administrative console to install the application from a local copy.
For information on deploying your application with the WebSphere administrative console, refer to the WebSphere Application Server Information Center.
Notes:
- On zSeries, there are some recommended server settings and additions to WebSphere variables. See Appendix A. Running HATS applications on a zSeries Server for details on the server settings and WebSphere variables.
- HATS applications deployed on WebSphere Application Server with Java 2 Security enabled will not start by default. Refer to the following link for instructions.
Changes necessary in the server environment
Depending on how you've created your projects, and the functions you have included in them, you might need to make some changes to the server environment in which the project runs.
Configuring class loader policies
When you install your HATS applications, or when running the applications in the HATS Studio in the Run on Server mode, configure your WAR class loader policy on a per J2EE application basis for any of the following situations:
- If you have more than one HATS application in an .ear file
- If your project connects to a host using secure sockets layer (SSL) security, the connection might not be established, even after the certificate is imported.
- If your project includes business logic, your business logic might cause a ClassNotFoundException to occur.
- If your project includes custom created components or widgets, the components or widgets might cause a ClassNotFoundException to occur.
To change the module visibility in WebSphere Application Server,...
- In the WebSphere administrative console, locate Enterprise Applications.
- Select the project .ear file you want to change.
- Change the .war class loader policy option to Application.
- Click Apply.
- Save your configuration.
- Stop and start the Enterprise Application.
To change the module visibility in Rational Studio,...
- Click Window > Show View > Servers.
- In the Servers window, which is located with the Console, Gallery, and Properties tabs, right click on WebSphere Application Server v6.0 select Start.
- When the status changed to Started, right click again on the server and select Run administrative console.
- Type in a User ID and press the Log In button.
- Expand the Applications tabs in the left hand navigation pane.
- Select Enterprise Applications.
- Click on the application link
- Go to the WAR class loader policy section, select Application and click OK.
- In the Messages window click the Save link and then the Save button.
- Stop the application server and then restart it for the changes to take effect.