< Previous | Next >

Lesson 1: Create a Struts project

Create a dynamic Web project that is enabled for Struts.

Struts is an open-source software framework for building Java™ Web applications. Struts uses the model-view-controller (MVC) design pattern for application development. The MVC design pattern helps you 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. In the menu bar, select File > New > Project to open the New Project window.
  2. Select Web > Dynamic Web Project and click Next to open the New Dynamic Web Project wizard.
  3. In the Project name field, type DayOfWeek.
  4. In the Target runtime field, select the runtime that you have configured. Click Next.
    Note: If you have not configured a runtime environment, click New to open the New Server Runtime wizard. For this tutorial, you can use one of the following servers:
    • A WebSphere® Application Server 5.1 test environment or remote server
    • A WebSphere Application Server 6.x runtime server
    • An Apache Tomcat 5.x runtime server
    (For more information about configuring an Apache Tomcat server, see http://tomcat.apache.org/download-55.cgi.)
  5. On the Project Facets page, click Struts, then click Next.
  6. On the Web Module page, click Next.
  7. On the Struts Settings page, click Finish.
  8. If you are not in the J2EE perspective, click Yes to open this perspective.
  9. If this is the first time that you are creating a Web project, click OK to enable the required product capabilities.
You can see the new Struts Web project in the Project Explorer. A corresponding Web diagram opens.
Tip: Select the Welcome to the Web Diagram Editor object on the Web diagram, and then press the Delete key to remove the object.
The workbench shows the Project explorer, Web Diagram Editor, and Palette.

Lesson checkpoint

You learned to create a Struts Web project, select a runtime environment, and open a new Web diagram.

< Previous | Next >