< Previous | Next >

 

Lesson 9: Test a Struts application

Use this lesson to learn how to test your Struts application in an IBM® WebSphere® or Apache Tomcat runtime environment. You should be able to see the input and output controls that you previously added to the JSP pages in this environment.

To test your Struts application:

  1. In the Enterprise Explorer, right-click the

    input.jsp file and select

    Run As | Run on Server.

  2. In the

    Server Selection window, select the server runtime that you configured for the Web project and click Finish. The input JSP page opens in a Web browser view.

  3. In the JSP page, type the following data in the fields:

    1. In the Day field, type 13.

    2. In the Month field, type 04.

    3. In the Year field, type 2005.

  4. Click the Submit button. The output JSP page is displayed in the Web browser view. The value in the DayOfWeek field should display Wednesday.

You can enter other dates in the fields of the input JSP to compute the corresponding days of the week.

 

Lesson checkpoint

Congratulations! You successfully tested your Struts application and viewed the output in a simulated Web browser.

You learned to do these tasks:

< Previous | Next >