Show TOC Start of Content Area

This graphic is explained in the accompanying text Building the Web Archive  Locate the document in its SAP Library structure

 

Use this procedure to create a WAR file that contains the Calculator.jsp, the CalcProxy JavaBean, and deployment descriptors – web.xml and web-j2ee-engine.xml. 

Prerequisites

This graphic is explained in the accompanying textThis graphic is explained in the accompanying text

You have created the Web module project CalculatorWeb that contains the CalcProxy JavaBean and Calculator.jsp.

Procedure

Entering a reference to an EJB using web.xml

       1.      In J2EE Explorer, expand the project structure of CalculatorWeb and double-click the web.xml node.

The Developer Studio opens a multipage editor, which allows you to enter descriptions in the standard deployment descriptor web.xml.

       2.      Choose the EJBs tab.

       3.      Select the node EJB References in the left frame and choose Add.

       4.      From the selection list that appears, select CalculatorEjb and confirm using OK.

       5.      Enter the name CalculatorBean for the Ejb Link.

This graphic is explained in the accompanying text

       6.      Save your changes to the deployment descriptor and close the editor.

This graphic is explained in the accompanying text

The EJB Reference enables you to look up the referenced enterprise bean.

Creating a War File

       7.      In J2EE Explorer, select the project node CalculatorWeb and open the context menu.

       8.      Choose Build Web Archive.

The system displays a message to inform you that the build was successful.

       9.      Close the screen with OK.

Result

The Web archive file CalculatorWeb.war has been generated. It contains all the classes, Web resources of the Web module project, and the entries in the deployment descriptors.

 

This graphic is explained in the accompanying text

 

Next step:

Now you can assemble the application.

 

 

End of Content Area