jst j2ee
Creating a J2EE Application (EAR) Module
WTP LogoWTP Home

This test case outlines the steps required to create a J2EE Application Project.

Creating a J2EE Application Project
  1. From any perspective, click File > New > Other > J2EE > Enterprise Application Project ...

  2. Click Next.

  3. Enter the Name 'EARProject', then click Next.

  4. You can configure Facets here and bind to the runtime.

  5. Click Next on New EAR Application wizard. The add modules to EAR page allows existing workpace modules to be added to the new EAR module. In this case there aren't any. Application Client, EJB, Connector, and Web modules may be created by clicking the 'New Module...' button. In this case, however, simply click the finish buutton to create the EAR Module without creating any other J2EE modules or adding any exiting modules to the EAR.

  6. After the wizard finishes, if you are not already in the J2EE perspective, you will be prompted to switch agree by selecting 'Yes'. In the J2EE perspective you will see the EARProject in the Project Explorer.

  7. Next create the following J2EE Projects. Be sure to add each module to the EAR module created above. Otherwise, choose the defaults (except for the Web Module, whose default is not to be added to an EAR).

    Module Type Module Name
    J2EE Application Client Module MyClient
    Dynamic Web Module MyWeb

    Here is an example for the first one:

  8. Now, you should see the modules represented under in the Project Explorer

  9. Create another EAR Project ('AnotherEAR'), except this time include all the modules on the second page of the new EAR Module Wizard.

    All the seleted modules should be added to the EAR when finishing the wizard. Verify this by checking the application.xml in the new EAR Module.

  10. Now create another EAR Module ('YetAnotherEAR'), except this time click the 'New Module...' button on the second page of the Wizard. Create some new modules from this page.

  11. The second page of the new EAR Module Wizard should only display J2EE modules which can be added the the new Application. For example, if creating a J2EE 1.3 Application, then only 1.3 compliant Modules should be displayed in this list. Ensure this is working properly by creating multiple Modules with multiple versions.