Scenario


You have tested the WebFaced application in the WAS test environment and you are ready to move it to your iSeries WAS environment. You are running WAS Version 5.0 on your iSeries server. The first step is to copy your WebFacing project files to the iSeries file system, and the second step is to install the application in the application server.

The J2EE standard has the concept of an Enterprise Archive File (EAR). This file is a zip file that contains all information about your Web application. In the workbench, this file is built automatically for Web projects. Since your WebFacing project is a Web project, the wflabxxEAR file exists already. You only have to move it to the application server, point to it, and then install the application. There is no need to worry about the structure of the application; everything is taken care of in the workbench.

Exporting the Files to the Web Server

This section describes how to copy the WebFacing project files to a WebSphere Application Server, Version 5.0. These first steps are the same for WebSphere Application Server, Version 5.0 and the Express, Version 5.0. If you are using WAS Version 4.0 or 3.5.6, follow the instructions in Appendix A or Appendix B.

Before you export any files, you must map a network drive to the Root file system on the iSeries where WAS is installed.

  • Right-click the Network Neighborhood (or My Network Places ) icon on the desktop.

  • Select Map Network Drive from the pop-up menu.

In the Folder field of the Map Network Drive dialog box (Figure 19.1),

click to expand
Figure 19.1: Map Network Drive dialog
  • Enter two backslashes (\\) and the Netserver name of your Web server, and then \root , for example, \\S400A\root .

  • Click the Finish push button.

You now have an additional drive available on your workstation, and you are ready to export your WebFacing project files.

Exporting Your EAR File

Return to the Development Studio Client workbench. In the WebFacing perspective,

  • Select the File option from the workbench menu bar.

  • Select the Export option from the pull-down menu.

The Select page of the Export wizard opens (Figure 19.2).

click to expand
Figure 19.2: Select page of Export wizard
  • Select the EAR file icon.

An EAR file is a compressed Enterprise Application Archive, and it contains all the files needed for the Web application.

  • Click the Next push button.

The EAR Export page opens (Figure 19.3).

click to expand
Figure 19.3: The EAR file Export dialog
  • Select the name of the resources you used when creating your WebFacing project. This should be wflabxxEAR.

In the Where do you want to export the resources to? field,

  • Specify where to put the EAR file by entering the drive and directory structure of the IFS drive you mapped in the earlier steps. For example, use the default WAS directory structure for installable applications:

    • x:\QIBM\UserData\WebAS5\Base\default\installableApps\wflabxx.ear,

    where x: is the drive letter mapped from your iSeries host in the previous steps.

    Note  

    For WebSphere Application Server Express, the default installation directory would be x:\QIBM\UserData\WebASE\ASE5\server_name\installableApps\wflabxx.ear

  • Select the Override existing resource without warning check box.

  • Click the Finish push button.

If you see a message asking you to create a directory or delete an existing file,

  • Click the OK or Yes push button and continue.

Now you can install the application in WAS. Continue here if you use WAS Express; otherwise skip to Installing the Application to a Remote WebSphere Application Server (page 456).

WAS Express Users: Installing the Application to a Remote WebSphere Application Server Express

At this point, you already need to have set up and started the WebSphere Application Server (WAS) Express and an associated HTTP server on your iSeries server.

Open any Web browser:

  • Type http:// servername :port#a/ in the URL entry field.

    Note  

    The default administrative port number for the HTTP server is 2001.

The Login dialog appears.

  • Type your iSeries user ID.

  • Type your iSeries password.

  • Click the OK push button.

In the browser,

  • Click the IBM WebSphere Application Server - Express for iSeries menu option (Figure 19.4).

    click to expand
    Figure 19.4: HTTP server administration menu

    Note  

    You could also select the first option: IBM HTTP Server for iSeries .

The administration pages for the HTTP and application servers display.

  • Select the Manage Tab.

The Manage Application Server - Express page displays (Figure 19.5).

click to expand
Figure 19.5: WAS Express control page
  • Select your WAS Express server instance in the Server combination box.

  • Click the Install New Application link in the Navigation tree.

The Install New Application page displays (Figure 19.6).

click to expand
Figure 19.6: Install New Application page
  • Select the Application is contained in an EAR file radio button.

  • Specify the location of your EAR file (the file that you exported in the previous step). You can use the Browse push button to locate the file.

  • Click the Next push button.

A page appears with options for application installation (Figure 19.7).

click to expand
Figure 19.7: Specifying option for application installation
  • Specify wflabxx in the Application name entry field.

  • You can select the Pre-compile JSPs check box to speed up the process of showing the page the first time. (JSPs are compiled into servlets when first touched.)

  • Click the Next push button.

The Map Virtual Hosts for Web Modules page appears (Figure 19.8).

click to expand
Figure 19.8: Selecting the virtual host to be associated with the Web modules
  • Select a Virtual host of your choice, or leave the default host selected.

  • Click the Next push button.

The Summary page displays (Figure 19.9).

click to expand
Figure 19.9: Summary page for application installation
  • Check the information.

  • Click the Finish push button.

After the successful installation you see a page where you can manage the installed applications (Figure 19.10).

click to expand
Figure 19.10: Manage Application Server page with configuration information
  • Click the Manage Installed Applications link in the Navigation bar.

A page with the installed applications displays (Figure 19.11).

click to expand
Figure 19.11: Selecting the application from the list
  • Select the wflabxx application radio button in the list of installed applications.

If the wflabxx application is disabled,

  • Click the Properties push button to enable the application.

  • Select Enable in the combination box, as shown in Figure 19.12.

    click to expand
    Figure 19.12: Enabling your application

  • Click the OK push button.

Now with wflabxx in the Enabled state (Figure 19.13),

click to expand
Figure 19.13: Starting the application
  • Select the wflabxx application radio button.

  • Click the Start push button.

After the wflabxx application is in Running and Enabled state,

  • Click the Close push button.

Now you are ready to test your application. Skip ahead to Running the Web-enabled Application (page 465).

Installing the Application to a Remote WebSphere Application Server

At this point, you need to have set up and started the WebSphere Application Server (WAS) and an associated HTTP server on a remote iSeries server.

Open any Web browser,

  • Type http://servername:port#a/admin in the URL entry field

Port#a refers to the Application Server Administrative Console port number.

Note  

The default Administrative Server port number is 9090.

The Login dialog appears (Figure 19.14).

click to expand
Figure 19.14: Login dialog for Administrator Console
  • Type any name in the user ID field.

  • Click the OK push button.

On the Administrative Console (Figure 19.15),

click to expand
Figure 19.15: Selecting Install New Application
  • Expand the Applications node on the left-hand navigation bar.

Click the Install New Application link in the left-hand menu.

The Preparing for the application installation dialog appears (Figure 19.16).

click to expand
Figure 19.16: Creating a new application, selecting the EAR file
  • Select the Server path radio button.

  • Specify the location of your EAR file (the file that you exported in the previous step). Here you need only specify the directory hierarchy relative to the server directory. If you followed the naming previously used, it would be under the default directory: installableApps/wflabxxEAR.ear.

    Note  

    You have to use forward slashes and not backslashes in the directory path.

  • Click the Next push button.

  • Accept the default virtual host unless you want to use a different one, as shown in Figure 19.17.

    click to expand
    Figure 19.17: Selecting a virtual host

  • Enter the application name, wflabxx , in the Application name entry field on the Install New Application dialog (Figure 19.18).

    click to expand
    Figure 19.18: Specifying the application name

  • Click the Next push button.

  • Select the check box beside the wflabxx application name in the Map virtual hosts for web modules dialog (Figure 19.19).

    click to expand
    Figure 19.19: Selecting the virtual host for the wflabxx application

  • Click the Next push button.

  • Select the check box beside the application module name wflabxx to map it to your application server, as shown in Figure 19.20.

    click to expand
    Figure 19.20: Specifying the application server for installation

  • Click the Next push button.

  • Now you can see the summary of the application you are going to create (Figure 19.21).

    click to expand
    Figure 19.21: Confirmation dialog

  • Verify that all of the information is correct.

  • Click the Finish push button.

  • Click the Save to Master Configuration link to save your changes (Figure 19.22).

    click to expand
    Figure 19.22: Final installation dialog in Administrative Console

  • Click the Save push button to save the changes to the configuration (Figure 19.23).

    click to expand
    Figure 19.23: Save dialog

To start your application in the application server,

  • Click the Enterprise Applications link in the navigation area on the left, under Applications, as shown in Figure 19.24. You will see all the installed applications on this server (Figure 19.25).

    click to expand
    Figure 19.24: Managing the installed application

    click to expand
    Figure 19.25: List of installed applications

If your application does not appear in the list, check to see whether there are multiple pages of installed applications. You can also sort the applications by name.

The page contains your wflabxx application in the list, as shown in Figure 19.26.

click to expand
Figure 19.26: List with selected application to be started
  • Select the check box beside wflabxx, the newly installed application.

Notice the status of your application is indicated as stopped .

  • Click the Start push button.

You will notice that the Status indicator of the wflabxx application changes to running, as shown in Figure 19.27.

click to expand
Figure 19.27: Status of wflabxx application is changed to running

You now have to enable the HTTP server to route requests for the wflabxx application to the application server. You have two choices. You can restart the HTTP server, which will automatically pick up a list of installed applications on the application server, or you can regenerate the information on the fly. You will regenerate the plugin information in this example.

  • Expand the Environment node in the navigation tree, as shown in Figure 19.28.

    click to expand
    Figure 19.28: Page to update the plugin configuration

  • Select the Update Web Server Plugin link.

  • Click the OK button on the Update web server plugin configuration page.

After a few moments, you will see a message as shown in Figure 19.29.

click to expand
Figure 19.29: Confirmation message for plugin update

Now you can run your application.

Running the Web-Enabled Application

You are now ready to run the Web-enabled application.

  • Open Internet Explorer.

  • Type http://servername:port#b/wflabxx in the URL entry field.

Port#b refers to your HTTP Server port number.

Note  

This is the http port name, most likely 80, not the application bootstrap port.

Your application index.html page should open. If it does not, double-check the URL and the port number. Also try restarting the HTTP server and the application server.

Refer to the Administrative Console Web site if you are having problems starting and running the HTTP server or the WebSphere Application Server.

If you still encounter problems, there are troubleshooting guides, FAQs, and newsgroups on the Web where you can find an explanation of your situation with more detailed information.




Understanding the IBM WebFacing Tool. A Guided Tour
Understanding the IBM WebFacing Tool: A Guided Tour (IBM Illustrated Guide series)
ISBN: 1931182094
EAN: 2147483647
Year: 2003
Pages: 153

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net