Home

 

Creating a Dynamic Web project with Struts support

Important: Be sure to have installed the Struts package during the installation phase of Rational Application Developer, because it is not selected by default, or you will not be able to use the Struts capabilities in your projects.

To verify and enable the Struts tools, launch the Installation Manager from Help Æ IBM Installation Manager, and enable the Struts support in the Modify Packages dialog under IBM Rational Application Developer Æ Web Development Tools Æ Struts Tools.

To create a Dynamic Web project with Struts support, do these steps:

Open the Web perspective.

Select File Æ New Æ Dynamic Web Project and click Next.

In the New Dynamic Web Project dialog, enter the following values:

Project Name: Type RAD75StrutsWeb.
Dynamic Web Module version: Select 2.5.
Configuration: Click Modify to open the Project Facets dialog. In the Project Facets dialog, select Default Style sheet (CSS file), and Struts (default version 1.3), then click OK (Figure | 5-4).
EAR Membership: Select Add project to an EAR and type RAD75StrutsEAR as name.

Figure 15-4 Create a Struts-based dynamic Web project: Facets

Accept the defaults in the Web Module dialog for Context Root, Content Directory and Java Source Director. Select Generate deployment descriptor, and click Next.

Accept the defaults in the Struts Settings dialog for the resource bundle and click Finish.

At this point, a new dynamic Web project with Struts support (RAD75StrutsWeb) and an enterprise application project (RAD75StrutsEAR) have been created. Close the Technology Quickstarts.

ibm.com/redbooks