Lesson 1.6: Testing your Struts application

Before you begin, you must complete Lesson 1.5: Creating two JSP files.

In this Lesson, you will test your Struts application in the WebSphere test environment.

Starting the test server

Test your application as follows:

  1. In the Project Explorer, right-click index.jsp and select Run > Run on Server. A Server Selection window opens.
  2. Make sure that WebSphere Application Server v6.0 is selected, and click Finish.
  3. If a Server Operation window opens, asking you whether you want to start the server, click Yes.
  4. Click Finish again. This brings up the index.jsp file for input.

Running your Struts application

To test the application, find out what day of the week January 18, 2000 was.

  1. Type the number 2000 in the year field.
  2. Type the number 18 in the day field.
  3. Type the number 1 in the month field.
  4. Click Submit. The output should look like the following image, which tells you that January 8, 2000 was a Tuesday:

Day of week: Tuesday

You can enter other dates in the fields to determine the day of the week for other dates.

Finish your tutorial by reviewing the materials in the Summary.

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.