Step 4: Displaying Results

In this step you will learn how to display data to a user. The tasks in this step are:


Create the Response Page

Edit the Page

  1. In Flow View, double-click the response.jsp icon to open this page in Design View.

  2. In Design View, right click the text New Web Application Page and select Cut.

  3. From the Palette tab, drag and drop the Label icon into Design View.

  4. Click the gray label icon to ensure that it is selected.

  5. In the Property Editor, in the section labeled General, in the value property, enter {request.message}, and press the Enter key. This will cause the String message, which is created by the hello method, to be displayed on the page.

  6. Press Ctrl+S to save your work.

Test the Web Application

  1. On the Application tab, double-click the file HelloController.jpf.
  2. Click the Start button, shown below:

  3. When the Workshop Test Browser launches, in the Name field, enter [your_name], and click hello.

  4. Your data is submitted to the hello method, a message is constructed, and that message is displayed on the response.jsp page.

Click one of the following arrows to navigate through the tutorial: