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 Account– follow 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 App
6. Application was deployed now you can click on Start button in order to activate app
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 Overview
9. Open Application URL for Java App
Application URL
10. Output screen
Java App Running
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
Very Well Written Naveen. Keep up the good work.
Thanks Parth
Hi Naveen,
Let me share with you a blog post on how to made the full-stack (database/REST/OData/UI) development easier:
https://blogs.sap.com/2020/09/10/eclipse-dirigible-saps-open-source-project-for-low-code-development/
You can find other interesting SAP specific content here: https://blogs.sap.com/tag/eclipse-dirigible/
Don’t hesitate to contact me, if you find this topic interesting
Regards,
Yordan
Very systematic and informative blog Naveen! Best of Luck! 🙂