Export J2EE applications

Exporting an enterprise application into an EAR file

Complete the following steps to export an EAR file:

  1. Switch to the J2EE perspective.

  2. From the File menu, select Export...

  3. Select the EAR file export wizard and click Next.

  4. Select the EAR project that you want to export.

  5. Select the location where you want to export.

  6. Specify additional options as appropriate using the Options check boxes.

    • To export source files, select Export source files.

    • If you are exporting to an existing JAR file and you do not want to be warned about overwriting it, select Overwrite existing files without warning.

    • To include build path information and metadata files, select Include project build paths and meta-data files. This allows you to preserve the original names of projects included in or referenced by the application project, for re-importing the EAR in another workspace. NOTE, however, that on re-import, binary projects will be created if this option is used.

    Exporting EAR file

  7. Click Finish.

The wizard exports the contents of the EAR project to the specified EAR file. Additionally, for each project that corresponds to a module or utility JAR in the application, the project contents are exported into a nested module or JAR file in the EAR file. If any unsaved changes exist on any of the files in any of the referenced projects, you will be prompted to save these files prior to export.

Exporting Web Archive (WAR) files

A Web archive (WAR) file is a packaged Web application that can be exported to test, publish, and deploy the resources developed within a Web project.

To export WAR file from a Web project, do the following:

  1. From the context menu of a Web project folder, select Export.... You can alternatively select menu File > Export...

  2. Select the WAR file export wizard and click Next.

  3. Specify the Web project you wish to export (this field is primed if you used the context menu to launch the wizard), and specify a location for the new WAR file.

  4. Optionally, supply WAR export Options, such as whether or not to include Java source files in the WAR, and whether to overwrite any existing resources during the export process.

    NOTE: Source files are not usually included in a WAR file, because they are not necessary for the server to run the web application.

    Exporting WAR file

  5. Click Finish.

Professional hosting     Belorussian informational portal         Free SCWCD 1.4 Study Guide     Free SCBCD 1.3 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     Free Mock Exam Engine