Skip to content

Deploying the OData Service

After building, the WAR file should be found in your project's deploy subfolder.

Automated Deployment During Service Generation

If you intend to do local deployment with the preview-mobile-server task, first check if the -local:server <folder> option is specified in build-local.options. If not, then add the option.

If you have used the deploy-mobile-server task or the preview-mobile-server task, the OData service will have been automatically deployed if the task completes successfully.

Manual Deployment to a Local or On-Premise Web Application Server

The procedure for deployment of the generated WAR file depends on the target server environment. Consult the relevant documentation for the target server environment for full details.

For Apache Tomcat, see Tomcat Web Application Deployment.

Sometimes Tomcat makes hot redeployment difficult because the running server process retains file locks. This issue may require restarting the server and manually deleting some files.

If you encounter any such issues, a fail-proof approach for redeployment into Tomcat is as follows:

  • Stop the server.

  • Delete the server's webapps\<app> folder.

  • Delete the server's webapps\<app>.war file.

  • Copy the new WAR file into the server's webapps folder.

  • Restart the server.

Manual Deployment to SAP Business Technology Platform – Cloud Foundry Environment

Using SAP Business Technology Platform Cockpit for Cloud Foundry

This procedure refers to the SAP Business Technology Platform Cockpit, and is subject to change if the cockpit UI changes. If in doubt, please consult the Develop Applications topic in the SAP Business Technology Platform documentation.

If you don't yet have a SAP Business Technology Platform account for Cloud Foundry, start by signing up.

  1. Once you are in the cockpit, navigate to your Subaccount, then your Space.

  2. Click on the Deploy Application button.

  3. For the File Location, browse to the WAR file in your project's deploy folder.

  4. For the Manifest Location, browse to the manifest.yml in your project folder.

  5. Click on the Deploy button.

Using the cf Command-Line Tool

If not already done, Install Cloud Foundry Tools.

  • Use the cf api command to select your target Cloud Foundry environment.

  • Use the cf login command to authenticate yourself with Cloud Foundry.

  • Use the cf push command to deploy your application to Cloud Foundry.

  • Use the cf routes command to find the URL for accessing your service.

Example push command:

cf push -f ~/projects/myapp/manifest.yml

Access the OData Service Through a Mobile Service Instance

Mobile device clients typically access deployed OData services through a mobile application and a mobile destination configured in SAP Mobile Services.

Since users typically use SAP Mobile Services to manage mobile application security configurations, the Mobile Services configuration is detailed in the security guide.

Please refer to the following topics: SAP Business Technology Platform Security – Quick Setup and SAP Business Technology Platform Security – Mobile Services).


Last update: May 19, 2025