Skip Headers

Oracle TopLink Developer's Guide 10g Release 3 (10.1.3) B13593-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# Step 3: Packaging for Deployment

To package the tutorial application for deployment, you must create the following files:

- Domain JAR File

- WAR File

- EAR File

To create these files, simply execute the `build` script in the `<TUTORIAL_HOME>` directory. For Windows, select the `build.cmd` file. For UNIX, select the `build.sh` file.

The `build` script compiles the Java source files and creates a domain JAR file (`servletjsp.jar`) and an EAR file (`servletjsp.ear`) in the current working directory. The EAR file contains the required WAR file.

You are encouraged to experiment with the tutorial Java source files and JSP (see "Source Files"). Using the `build` script, you can compile your changes and recreate the `servletjsp.jar` and `servletjsp.ear` file.

## Domain JAR File

The domain JAR file contains the TopLink files and domain objects required by the application. The `<TUTORIAL_HOME>\servletjsp.jar` file contains the following:

- `EmployeeProject.xml` (the deployment XML)

- `sessions.xml` (the sessions configuration)

- `*.class` (the mapped classes required by the application, in a fully-resolved directory structure)

The `sessions.xml` file and the `employeeProject.xml` file must appear at the root of the JAR file. The class directory structure must start at the root of the JAR file.

## WAR File

The WAR file contains the web application files used in the tutorial project, including the following:

- `*.jsp` files that provide the dynamic content for the application

- Static HTML content for the client application

- The same contents as the domain JAR file (see "Domain JAR File")

In this tutorial, the WAR file is a component of the EAR file (see "EAR File").

## EAR File

The EAR file contains the WAR file and the application server-specific files required for deployment. The `<TUTORIAL_HOME>\servletjsp.ear` file contains the following:

- WAR file (see "WAR File")

- `data-sources.xml` file

- `application.xml` file

- `<ApplicationServer>-application.xml` file (for example, for OC4J, `orion-application.xml`)