Generating Struts Artifacts

You can use OEPE to automatically generate various Struts artifacts for your dynamic Web project. To do so, perform the following steps:

Configuring a Project for Struts

To configure your dynamic Web project for Struts:

  1. Either add the Struts facet when you create the project, or add the facet to an existing project by right-clicking your project in the Project Explorer and selecting Properties from the drop-down menu. This will open the Properties dialog.

  2. In the Properties dialog, select Project Facets on the left panel, and then select Struts from the Project Facet list. Note that the Struts facet requires dynamic Web module version 2.3 or later.

    To configure your project to use Struts 1.3 library, select the Struts 1.3 facet, and then click Further configuration required... link. This will open the Modify Faceted Project > Struts dialog. If Struts 1.3 is not listed, then click Download Library icon to indicate your intention to obtain the library. This will open the Download Library dialog.

    Note that you can either add the library from the local installation, or you can select a shared library provided by Oracle WebLogic Server (if this option is supported).

    Select Struts 1.3 library and the destination folder, and then click Next. Note that if you select a library other than Struts, or a mismatch between a Struts facet version and library version is detected, a notification message will be displayed alerting you of the error.

    On the next screen, accept the term of the Apache license, and click Finish to trigger the download.

  3. Click OK on the Modify Faceted Project > Struts Facet dialog.

  4. By clicking Apply > OK on the Properties dialog, you will complete the configuration of the Struts library for your project.

Generating Struts Files and Updating the Configuration

When added to your dynamic Web project, the Struts facet automatically generates the following artifacts and preforms the following configurations:

Configures the web.xml file, as follows: