Exercise 6.2: Finding the Web application and running it

Before you begin, you must complete Exercise 6.1: Opening the Web perspective.

To test your application locally using the WebSphere test environment:

  1. In the Project Explorer, expand your project WSSLABxx.
  2. Expand the WebContent folder.
  3. Right-click inquiry.jsp and click Run > Run on Server on the pop-up menu.
    Project Navigation

    You will see a message to select the Server to run. You will run your application in the WebSphere Test Environment. This is shown as WebSphere Application Server v6.0.
    Server selection

  4. Leave the default Choose an existing server radio button selected.
  5. Make sure WebSphere Application Server v6.0 is selected under Select the server type you want to use.
  6. Select the Set server as project default (do not prompt) check box.
  7. Click Finish to configure and launch the server.
  8. A Server Selection message dialog appears indicating the operation is in progress.
    Server Selection message

    After the WebSphere server has started, your Web application input page will display in the workbench browser.
    Workbench browser

  9. Type 0010100 as the Customer Number.
  10. Click Submit.

    This launches the generated output or result page.

    1. If you see a Page not found error, go to the Servers view.
      Restart server
    2. Restart the server instance. Then go back and try the Run > Run on Server option again; the Server sometimes needs to be restarted to pick up the changes.

    You will see the Result page with customer data appearing in the workbench browser.
    Result page
    Next, test the message handling.

  11. Click the Back button Back button in the browser to get back to the first page.
  12. Enter a wrong customer number, for example, 9999.
    Incorrect input
  13. Click Submit.

    An error message appears.
    Error message

    This capability is generated by the Web Interaction wizard. Remember that you specified something for the feedback field; you specified the message file to be accessed if the feedback field contains a non 0 value; in this case the feedback parameter will contain the message ID to be used for the error message.

You have found and run the Web application.

Module recap

You have completed Module 6. Running the Web application. You have learned how to:

Now that you have run your Web application you learn how to debug your Web application. Continue to Module 7. Debugging a Web application.