Lesson 1.1: Creating a Struts project

In this lesson, you will create a dynamic Web project enabled for Struts.

Struts is a framework of open-source software designed for building Web applications quickly and easily. Struts uses the model-view-controller (MVC) design pattern of application development. The MVC design pattern makes it easier to create and maintain complex Web applications by separating the application into three parts:
Tip: To learn more about Struts technology, visit http://struts.apache.org/.

To create a new Struts-based Web project:

  1. From the menu bar, click File > New > Project. The New Project window opens.
  2. Expand Web and select Dynamic Web Project, then click Next. The New Dynamic Web Project wizard opens.
  3. In the Project name field type DayOfWeek.
  4. In the Target runtime field, select the runtime you have configured, then click Next.
    Note: If you have not configured a runtime server, click New to start the New Server Runtime wizard. For this tutorial you can use a WebSphere® Application Server 6.x, a WebSphere Application Server 5.1 test environment or remote server, or an Apache Tomcat 5.x runtime server. If you need help configuring a runtime, see http://tomcat.apache.org/download-55.cgi.
  5. On the Project Facets page, click Struts, then Next.
  6. Do not change anything on the Web Module page. Click Next.
  7. Do not change anything on the Struts Settings page. Click Finish.
  8. If you are not in the J2EE perspective, a message displays asking if you want to open this perspective. Click Yes.
  9. If this is the first time you are creating a Web project, a confirmation dialog displays asking if you want to enable certain capabilities needed for Web projects. Click OK.
  10. A new Struts Web project is created and visible in the Project Explorer view. A new Web diagram opens where you can visually edit and build your Web projects.
Note: Select the Welcome to the Web Diagram Editor object on the Web Diagram, then click Delete key to close Welcome.
A new Struts Web project is created and visible in the Project Explorer view. A new Web diagram is also created and open. Shows the Project explorer, Web Diagram Editor, and Palette

Lesson checkpoint

You have learned how to create a struts web project, chosen a runtime environment, and opened a new Web diagram.

You:
  • Opened a new struts web project.
  • Chose a runtime environment.