Deploy a Simple JSP Project on SAP Cloud Platform
Looking at the title of the blog, the very first question comes, Why JSP?
Here is the answer:
For any beginner, its really difficult to understand the nooks and crany of servlets let alone the understanding of spring-boot and spring framework.However everyone want to create an application combining HTML and Java and hence JSP comes to rescue.
We want to create a java application which runs on SAP Cloud Platform and does something for me.
Here I am creating a very simple Clock application which shows current system date using JSP
An account in SAP Cloud Platform
Eclipse JAVAEE IDE
Now Lets do this:
- Create a Project of type “Dynamic Web Project”
- under Webcontent folder of Project, Create a file of type “JSP” and name it as Clock.jsp
change the file as specified below:
And we are done with the development.
Now comes the part of deployment for which we require a war file and hence right click on the project and export as war.
Go to “Java Application” deployment option of “SAP Cloud Platform Cockpit” and create an application using “deploy application” option
Make necessary settings as specified below
Deploy and start the application and you can access the application under the specified url as follow:
<your host>/<Project Name>/clock.jsp
Advantage of this application is again because of the JSP nature where you can include Java and HTML in the same page and build simple application at least.
Happy SCP 🙂