Lesson 1.8: Testing the Struts application

In this lesson, you will test your Struts application in the WebSphere or Tomcat test environment.

To test your Struts application:

  1. In the Project Explorer, right-click input.jsp and select Run > Run on Server. A Server Selection window opens.
  2. Select WebSphere Application Server 6.x or Apache Tomcat Server, then click Finish.
  3. If a Server Operation window opens, asking you whether you want to start the server, click Yes.
  4. Click Finish. The input.jsp file opens in a Web browser view. (ADD IMAGE)
  5. In the year field, type 1960.
  6. In the day field, type 12.
  7. In the month field, type 10.
  8. Click Submit. The output.jsp displays with the following string: (ADD IMAGE)
You can enter other dates in the fields to determine the day of the week.

Lesson checkpoint

This lesson shows you how to test your Struts application.

You learned to::
  • Open the input.jsp in a Web browser.
  • View the output display in its proper string format