In this tutorial, you will learn how to create
a simple Struts application that contains two Web pages, an action
mapping, and a form bean. You will use the Web diagram editor to help
you visualize the logic flow of the application. The resulting application
displays an input Web page where users can type a year, a month, and
a date. If the input is valid, the corresponding day of the week is
computed and shown on an output Web page. If the input is invalid,
an error message is displayed on the input Web page. You will also
learn how to set up a runtime test environment and test
your application.
Learning objectives
You
will learn how to do these tasks:
- Create a Struts project
- Edit your Web diagram
- Create and edit a form bean
- Create input and output JavaServer Pages (JSP) files
- Create an action and an action mapping
- Add ActionError tags to the input JSP page
- Test your Struts application
Time Required
This tutorial should take
approximately 60 minutes to finish. If you explore other concepts
related to this tutorial, it could take longer to complete.
Skill level
Advanced
Audience
Web application developers and
Web user interface designers
System requirements
To complete
this tutorial, you need one of the following servers configured on
your local machine:
- WebSphere® Application Server v7.0
- WebSphere Application Server 6.x
- An Apache Tomcat 5.x runtime server
To complete this tutorial, you must install Struts Tools.
To install Struts Tools, in Installation Manager, click Modify.
In the Features list, select Struts Tools then
click Modify.
Prerequisites
To complete this tutorial,
you should be familiar with the following areas:
- Basic Web design concepts, such as sites, pages, browsers, and
servers
- Web page elements, such as tables, hyperlinks, forms, and images
- Editing HTML code for Web pages
- Workbench perspectives and views in Eclipse-based products