Scenario


You want to create a WebFacing project that shares an EAR file with another WebFacing project; that is, you want to add the project to an existing EAR file. You then decide to delete the WebFacing project.

When you create or delete a WebFacing project, some of the information in the shared EAR file is not synchronized. This can cause startup problems when you try to run Web applications in the test environment. In this exercise, you will learn how to recover from these problems.

Creating a Project

In order to preserve the WebFacing project you have created in the previous exercises, I want you to create a similar WebFacing project just to be able to delete it.

Create a new WebFacing project with the name wflaba:

  • Use the WebFacing Project menu option as shown in Figure 12.1: New project list to create new WebFacing project1.

    click to expand
    Figure 12.1: New project list to create new WebFacing project

In the WebFacing Project wizard (Figure 12.2),

click to expand
Figure 12.2: Specify project name and EAR name
  • Specify wflaba as the project name.

  • Specify use of the existing wflabxxEAR as the EAR file project name.

  • Click the Next push button to proceed to the next page.

  • Select JSP level 1.3.

  • Click the Next push button to proceed to the next page.

On the Select Display File Source Member page (Figure 12.3),

click to expand
Figure 12.3: Selecting DDS source members
  • Click the Refresh DDS list push button.

In the list box,

  • Expand your iSeries connection.

  • Expand your wflabxx library.

  • Select the QDDSSRC file in the wflabxx library.

  • Click the >> push button to select all members in QDDSSRC.

  • Click the Next push button to proceed to the next page.

Skip the Select UIM source members page by

  • Clicking the Next push button.

On the Specify CL commands page (Figure 12.4),

click to expand
Figure 12.4: Specify CL commands page
  • Enter call ordentr in the CL command entry field.

  • Select the Sign on with specified values radio button.

  • Click the Add push button.

  • Click the Next push button to proceed to the next page.

On the Choose Web Style page,

  • Click the Next push button (to choose the default style).

On the Complete WebFacing Project page,

  • Select the Yes, I want to create the project with conversion now radio button.

  • Click the Finish push button.

You might get a Repair Server Configuration error message as shown in Figure 12.5.

click to expand
Figure 12.5: Message dialog to repair server configuration
  • Click the OK push button on the message dialog.

The WebFacing project is created and conversion begins.

Once conversion is finished, you can run your application. In the WebFacing Projects view,

  • Right-click the new wflaba project.

  • Select Run on Server from the pop-up menu.

In the browser you might get the error message "The page cannot be found" (see Figure 12.6). You will then have to restart the application server.

click to expand
Figure 12.6: Servers view in workbench with Restart option on pop-up menu
  • Select the Servers tab.

In the Servers view,

  • Right-click the server you are using.

  • Select the Restart option from the pop-up menu.

  • Close the browser.

After the server has started, go to the WebFacing Projects view.

  • Right-click the wflaba project.

  • Select Run on Server from the pop-up menu.

In the browser window,

  • Click a link on the index.html page, to run the application.

  • Press F3 to exit the application.

  • Close the browser by clicking the X on its window bar.

Now you are ready to delete the project.

Deleting the WebFacing Project

In the WebFacing Projects view (Figure 12.7),

click to expand
Figure 12.7: Select Delete option from pop-up menu
  • Right-click the wflaba project.

  • Select Delete from the pop-up menu.

A message box displays as shown in Figure 12.8.

click to expand
Figure 12.8: Delete confirmation message box
  • Select the Also delete contents under... radio button.

  • Click the Yes push button.

The Repair Server Configuration dialog (Figure 12.9) will appear.

click to expand
Figure 12.9: Repair Server Configuration dialog
  • Leave the default selections.

  • Click the OK push button.

The WebFacing project wflaba is deleted. If you switch to the Navigator view, as shown in Figure 12.10, you will notice that the wflabxxEAR file still exists. This is necessary since the wflabxx project also uses the EAR file. An EAR file can contain information about multiple projects, so it is not safe to delete it when only one project is deleted. An EAR file will not be deleted when a project gets deleted, even if it is the only project that actually uses the EAR file.

click to expand
Figure 12.10: Navigator view with wflabxxEAR
Tip  

If your EAR file contained only information from the deleted WebFacing project, then it would be easiest for you to delete this EAR file. That way you do not have to worry about synchronizing your Web Server environment.

Now you will work with the original project again.

Run the application in Development Client Version 5.0. In the WebFacing Projects view,

  • Right-click the original wflabxx project.

  • Select Run on Server from the pop-up menu.

You will see an error message in the browser: "The page cannot be found."

  • Restart the application server.

You might get an application server error message that the server did not start correctly (Figure 12.11).

click to expand
Figure 12.11: Message dialog that server did not start correctly
  • Click the OK push button.

Removing the WAR File From the Module List

Go to the Navigator view (Figure 12.12).

click to expand
Figure 12.12: Navigator view and Application Deployment Descriptor
  • Expand the wflabxxEAR node.

  • Expand the META-INF node.

  • Double-click the application.xml file.

An editor window opens with the Application Deployment Descriptor file.

  • Click the Module tab.

  • Select the leftover wflaba.war file from the list of modules.

  • Click the Remove push button.

  • Save the file.

  • Close the edit window.

  • Right-click the wflabxx project icon.

  • Select the Run on Server option from the pop-up menu.

Your project is now working; you had to remove the WAR file from the module list.

Handling the Publishing Failure Message

Sometimes you may receive a "Publishing failed" error message that requires some action to get you going again. Here I describe the necessary steps.

You may see a dialog telling you that publishing has failed, as shown in Figure 12.13.

click to expand
Figure 12.13: Publishing error
  • Click the Details push button.

The details text tells you how to fix this error. The circled area in Figure 12.13: Publishing error13 indicates the relevant section in the error message.

To fix this problem,

  • Click the OK push button on the error dialog.

  • Switch to the Navigator view.

In the Navigator view,

  • Locate and expand the Servers folder.

  • Double-click the .wsi server file, as shown in Figure 12.14.

    click to expand
    Figure 12.14: Navigator view with defaultServer.wsi file

An editor should open , where you can edit the server properties. Before the editor opens, however, you receive a warning as shown in Figure 12.15.

click to expand
Figure 12.15: Warning that configuration problems exist
  • Click the Yes push button to repair the problem.

The editor opens after the repair is completed, and you do not need to take any further action.

  • Close the editor by clicking on the X of its window bar.

A message displays, as shown in Figure 12.16, telling you that the configuration has been changed.

click to expand
Figure 12.16: Save confirmation message
  • Click the Yes push button to confirm and save.

When you return to the workbench,

  • Select the Servers tab at the bottom of the workbench window, as shown in Figure 12.17.

    click to expand
    Figure 12.17: Servers view in workbench with pop-up menu

In the Servers view,

  • Right-click the server you are using.

  • Select Start or Restart from the pop-up menu (whichever is enabled).

After the server starts, switch to the Navigator view or the WebFacing Projects view:

  • Right-click the wflabxx project.

  • Select Run on Server from the pop-up menu.

Now the application will display and run as it should. You have repaired the problem.

Note  

When you create a Web project with the same name as the one that you deleted, you might encounter the Repair Server Configuration dialog again. Click the OK push button on the dialog and the project should be created without any problems.




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