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. |
...
1. Choose File → New → Project.
2. Select J2EE (the left-hand pane) and Enterprise Application Project (the right-hand pane). Choose Next.
3. Enter CalculatorEar as the project name and leave the default settings unchanged. Choose Next.
4. Select CalculatorEjb and CalculatorWeb as referenced projects. Choose Finish.
The wizard generates the project structure of the new Enterprise Application project.
5. Expand the project node and double-click the application.xml.
The deployment descriptor editor appears.
6. Choose the Modules tab.
7. Select CalculatorWeb.war as a module.
8. 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.
9. Save the editor contents.
10. In the J2EE Explorer, select the project node CalculatorEar.
11. Open the context menu and choose Build Application Archive.
The system displays a message to inform you that the build has been successful.
12. 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.
|
|
You can deploy the application on SAP J2EE Engine.