Skip to Content
Technical Articles

Deploy Java WAR file in SAP cloud Platform to generate Rest API which can be consumed in UI

I am working as Fiori/SCP/SAPUI5 consultant and in this blog, I am going to discuss how to deploy java application In SAP Cloud platform to generate JSON based consumable Rest api.

Please follow the below to get access in SCP Neo Environment and deploy java application.

1. Create and register in SAP Cloud Platform Accountfollow below blog to register in SCP

https://developers.sap.com/tutorials/hcp-create-trial-account.html

2. Click on java application

         

3. Deploy Application

4. Browse WAR File Location – Provide required information such as WAR File, application name and additional parameters

5. Click on Deploy Button

Deploy%20App

Deploy App

6. Application was deployed now you can click on Start button in order to activate app

Application%20was%20deployed%20now%20you%20can%20click%20on%20Start%20button%20in%20order%20to%20activate%20app

Application was deployed now you can click on Start button in order to activate app

7. As you see application has been activated and started

8. Application Overview

Application%20Overview

Application Overview

9. Open Application URL for Java App

Application%20URL

Application URL

10. Output screen

Java%20App%20Running

Java App Running

 

 

Final%20Rest%20API

Final Rest API

 

 

Final Rest API URL –

Below is our REST API which is returning JSON data.

https://javaappp19******trial.hanatrial.ondemand.com/JavaApp/webresources/myresource

 

How To consume API-

If you want to consume this API you can create destinations in SCP and consume in UI application.

You can use SAP WEBIDE for UI development.

 

Here in this blog we have learned how to deploy java application in SAP Cloud platform.

The main purpose of this blog was deploying JAVA WAR file in SAP Cloud Platform and get the rest API which is the output of JAVA application.

The Rest API Can be consumed in any UI such as fiori/UI5.

 

Thank you for reading this blog on SAP Cloud Platform !

Regards

Naveen Jain

4 Comments
You must be Logged on to comment or reply to a post.