Importing and running the application in Development Studio Client

Five zip files exist in your installed program files for Development Studio client, by default in the c:\wdsc\wdscsampl directory. These files are:

You will import each one separately into the Development Studio Client workbench and specify a corresponding Enterprise Archive (EAR) file for each. An EAR file is a standard Java Archive (JAR) file with an .ear extension. They can contain multiple Web projects, and you use them to package and deploy your Web applications to the WebSphere Administrative Server (WAS).

The first four files correspond to the Web projects, and the fifth one corresponds to a WebFacing project. First, you create the Web projects, and then you create the WebFacing project. Afterwards, you import the contents of the zip files into the five projects.

Extracting the .zip files on your local system

Before you can import the contents of the scenario .zip files into the Development Studio Client workbench, you need to extract them into separate directories, so that you can import them as file systems, rather than as a .zip files.

Note:
If you are using a program other than WinZip, complete the tasks as you would with that program.
  1. On your local system, navigate to c:\wdsc\wdscsampl. The c:\wdsc directory could be different if you chose to install to a different drive or a different base folder. If so, navigate to that directory, and then find \wdscsampl.
  2. Double-click on the following .zip file: SV000501.zip.
  3. Click the Extract button and navigate to the same folder where the zip files are, by default, c:\wdsc\wdscsampl.
  4. Select the All Files radio button, and then click Extract.
  5. If you look in your wdscsampl directory, you will see that a SV000501 folder is created, with all the necessary files inside.
  6. Now that all of the files are extracted into c:\scenario\SV000501, delete the SV000501.zip file so that you do not accidentally select it when you import your file system.
  7. Repeat the steps in this section for the other four .zip files (SV000618.zip, SV001585.zip, SV001586.zip, and SV000514.zip.)

Creating the Web projects

In this section, you will create Web projects for SV000514, SV000618, SV001585, and SV001586. The steps to create each project are outlined separately. Although the steps might seem repetitious, keep in mind that there are a few minor but important differences you need to take note of when creating the four projects, (concerning which EAR files are associated with which projects).

To create the Web projects:

  1. Open IBM WebSphere Development Studio Client for iSeries from the Start menu.
  2. In Development Studio Client, open the Web perspective with the menu bar by clicking Window > Open Perspective > Other > Web and click OK.
  3. Click File > New > Dynamic Web Project.
    1. In the Project name field, enter SV000514.
    2. Check the Configure advanced options check box and click Next.
    3. Click the New button beside the EAR project field.
    4. In the Project name field, enter SVWholeSaleEAR and click Finish on both dialog boxes.
  4. Click File > New > Dynamic Web Project.
    1. In the Project name field, enter SV001586 and click Next (The Configure advanced options check box should be checked automatically).
    2. Verify that SWholeSaleEAR is selected in the EAR project drop-down field.
    3. Click Finish.
  5. Click File > New > Dynamic Web Project.
    1. In the Project name field, enter SV000618 and click Next.
    2. Click the New button beside the EAR project field.
    3. In the New project name field, enter SVStoreEAR and click Finish on both dialog boxes.
  6. Click File > New > Dynamic Web Project.
    1. In the Project name field, enter SV001585 and click Next.
    2. Verify that SVStoreEAR is selected in the EAR project drop-down field.
    3. Click Finish.

Importing the Web project files

To import the file systems into your workspace, the following procedure outlines how to import the files in SV000514. The procedure is the same for the other three Web project file systems: SV001586, SV001585, and SV000618 . The section after this one explains how to create and import the WebFacing project.

To import the files:

  1. Click Browse and navigate to
  2. Right-click the SV000514 folder and select Import.
  3. From the Import wizard, click File System and then click Next.
  4. Browse to the directory where you extracted the scenario files; by default this should be c:\wdsc\wdscsampl.
  5. Click SV000514 and click OK.
  6. Click Select All to make sure that all components of the SV000501 files system are selected.
  7. In the Into Folder field, enter SV000514 if it is not already filled in by default.
  8. Select the Overwrite existing resources without warning check box.
  9. Click Finish and click Yes if you receive any dialogs asking your about modifying the context root.
  10. Repeat steps 2 to 9 for SV001586, SV001585, and SV000618, making sure to use the different project names as you complete the steps.

Importing the WebFacing project files and creating the WebFacing project

Project SV000501 is different from the four Web projects you just created, because SV000501 is a WebFacing project. WebFacing projects are different because they include different files, and have a unique structure specific for handling DDS files from your iSeries server.

To import the files and create a WebFacing project:

  1. If you are not in the Project Navigator view, click the Project Navigator tab.
  2. Right-click inside the view and select Import.
  3. In the Import window, select WebFacing Projects and click Next.
  4. Browse to the directory where you extracted the scenario files; by default this should be c:\wdsc\wdscsampl.
  5. Select SV000501 and click OK. Click Next.
  6. In the WebFacing projects found area of the window, select the SV000501 checkbox.
  7. In the Enterprise Application Project (EAR) field, typeSVStoreEAR.
  8. Click Finish.

Now that you have imported all of the files, your workspace should look something like this:
This screen shot shows the Web perspective, emphasis place on the Navigator view, showing all the project folders and EAR files.

If you see errors beside your imported projects, (indicated by red x marks), right-click each project and select Rebuild Project. Depending on what is in your workspace, this should clear up most of the errors so that the application runs properly. Any errors you still see could exist because some of the code has not fully migrated to the 5.1 release of Development Studio Client. You can continue with the exercises in this chapter to help introduce yourself to the product, or you can proceed to the next chapter to try building the applications from scratch.

Server configuration

Now that you have imported all of the source files, you need to configure the WebSphere Test Environment server so that it recognizes the SVWholesaleEAR and SVStoreEAR applications.

To configure the WebSphere Test Environment server:

  1. Switch to the Server perspective. From the workbench menu bar, click Window > Open Perspective > Other > Server and click OK.
  2. In the Server Configuration view, right-click Servers and select New > Server and Server Configuration.
  3. In the Server name field, enter Scenario server.
  4. In the Folder field, enter Scenario folder.
  5. In the Server type box, expand WebSphere version 5.0 and click Test Environment, if it is not already be selected by default.
  6. Click Finish and click Yes if you receive any messages.
  7. To add the EAR files to the server configuration:
    1. Expand Servers.
    2. Right-click Scenario server and select Add > SVWholeSaleEAR.
    3. Expand Servers.
    4. Right-click Scenario server again and select Add and Remove Projects.
    5. Select click the Add All button to move both SVStoreEAR and SVWholeSaleEAR to the right side of the window.
    6. Click Finish.
  8. In the server configuration view, expand Scenario server and then expand SVStoreEAR and SVWholeSaleEAR to see all of your applications listed:
    This screen shot shows the Server Configuration View, expanded to display your EAR files and associated applications.

    To ensure that the server has picked up the projects:

  1. In the Servers view, to the right of the Server Configuration view, (click the Servers tab if you cannot see the Servers view), right-click Scenario server and select Publish. A Publishing dialog box appears to show you the progress of publishing.
  2. Click OK to publish your applications to the WebSphere Application Server test environment.
  3. When publishing is finished, click OK on the dialog box.
  4. In the same view, right-click Scenario server again and click Start. The Console view opens to show you the server's activities. The server is started when you see the line "Server servername open for e-business" message at the bottom of the view. Scroll down to see all of the messages.

Configuring the WebFacing project

Before you run the application or work on the SV000501 module, you need to start the WebFacing server for the application to run, and you need to configure the project so that it uses the correct iSeries server.

To start the WebFacing server:

  1. Open a green-screen 5250 emulator and sign on with your user ID and password.
  2. At the command line, enter strtcpsvr *webfacing.
  3. At the bottom of the screen you should see the message, "WEBFACING server starting".

You now need to change WebFacing properties, back inside the Development Studio Client workbench:

  1. Switch to the Web perspective (you can switch between perspectives by clicking the icons clustered on the left side of the screen).
  2. Click the Project Navigator tab so that you can see your project structures.
  3. Expand SV000501 and double-click Web Deployment Descriptor.
  4. Click the Parameters tab.
  5. Click WFDefaultHost.
  6. In the Value field, erase the existing value and enter the name of your iSeries server.
  7. From the workbench menu bar, click the Save icon or click File > Save Web Deployment Descriptor. Click OK if you receive any messages. Close the file.

Defining server information

Now you need to define the iSeries server information for all five projects, ensuring that they are configured to run with your iSeries server under your user ID and password. To define server information:

  1. Make sure you are in the Web perspective.
  2. In the Project Navigator view, right-click SV000501 and select Specify iSeries Web Tools Run-time Configuration.
  3. In the iSeries server name field, delete the existing value and enter the name of the iSeries server.
  4. Delete the other existing values and enter your user ID and password.
  5. Click Finish (and click Finish again if necessary).
  6. Repeat steps 2 to 5 for the other four projects: SV000514, SV000618, SV001585, and SV001586.


[ Top of Page | Previous Page | Next Page | Table of Contents ]