Entering content frame

Procedure documentation Assembling the Application Locate the document in its SAP Library structure

Use

To prepare your application for deployment, you have to:

·        Build the WAR

·        Create an Enterprise Application Project

·        Create a DataSource Alias

·        Assemble the EAR file

Procedure

Building the WAR

I...

       1.      In the J2EE Development perspective, extend the GettingStartedOpenSQLWeb node and open web.xml.

       2.      Go to the Mapping tab, select Servlet Mappings and choose Add.

       3.      Add the ProcessInput servlet and enter ProcessInput in the URLPattern field.

       4.      You must also add a resource reference for the DataSource that your application uses. To do this, go to the Resource tab, select Resource entries and choose Add. Modify the entry as follows:

This graphic is explained in the accompanying text

Note

For more information about DataSource resource references, see Accessing DataSource.

       5.      Save and close the XML file.

       6.      From the context menu of the project choose Build WAR File.

Creating the Enterprise Application Project

...

       1.      Choose File ® New ® Project. Select J2EE in the left-hand pane and Enterprise Application Project in the right-hand pane. Choose Next.

       2.      Enter a name for the project – for example, GettingStartedOpenSQLEar. Choose Next.

       3.      In the Referenced Projects field choose GettingStartedOpenSQLWeb. Choose Finish.

       4.      Extend the GettingStartedOpenSQLEar node and open application.xml.

       5.      On the General tab, enter GettingStartedOpenSQL as a display name. On the Modules tab enter gettingstarted-sql as a context root.

       6.      Save and close the XML file.

Creating the DataSource Alias

...

       1.      Select the GettingStartedOpenSQLEar project and open its context menu. Choose New ® META-INF/data-source-aliases.xml.

       2.      Enter TMP_PERSISTENCE_EXAMPLE as the name of the DataSource alias.

Note

For more information about DataSource aliases, see Managing Aliases.

       3.      Choose Finish.

Assembling the EAR

Open the context menu of the GettingStartedOpenSQLEar project and choose Build EAR File. The system informs you if the process has finished successfully.

Result

Now you can deploy and run the application.

 

Leaving content frame