
Use this procedure to package the Calculator session bean, the CalcProxy JavaBean, and the Calculator JSP in an application archive (EAR file). The EAR file contains the JAR and the WAR files with the application components, as well as deployment descriptors - application.xml and application-j2ee-engine.xml.
You have already created the archive files CalculatorEjb.jar and CalculatorWeb.war.
Creating the Enterprise Application Project
Choose
.Select J2EE (the left-hand pane) and Enterprise Application Project (the right-hand pane). Choose Next.
Enter CalculatorEar as the project name and leave the default settings unchanged. Choose Next.
Select CalculatorEjb and CalculatorWeb as referenced projects. Choose Finish.
The wizard generates the project structure of the new Enterprise Application project.
Defining the Context Root
Expand the project node and double-click the application.xml.
The deployment descriptor editor appears.
Choose the Modules tab.
Select CalculatorWeb.war as a module.
Change the name of the predefined value in the Context Root field to /Calculator
The new context root /Calculator will be used for starting the application.
Save the editor contents.
Building the EAR file
In the J2EE Explorer, select the project node CalculatorEar.
Open the context menu and choose Build Application Archive.
The system displays a message to inform you that the build has been successful.
Close the screen by choosing OK.
The Enterprise archive file CalculatorEar.ear has been generated. It contains all the EJB classes and all Web resources, along with the deployment descriptors from the Enterprise Application project.
Next step:
You can deploy the application on SAP J2EE Engine.