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.
JSP:JavaServer Pages (JSP) is a technology that helps software developers create dynamically generated web pages based on HTML, XML, or other document types – Source: WIKIPEDIA
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 🙂
Thx for the article.
I believe you got a typo. It’s Spring Boot and Spring framework, not sprint.
It was typo. corrected 🙂
I am not sure if i can ask you the question here. since your post is relevant to the subject am looking for. thought you could give some insights.
I am developing a dynamic project and executing it with Javaweb tomcat 8 server in local now.It working perfectly.
But when i upload in cloud its not 🙁
say. I have a jsp form which has file upload. I am uploading to servlet path and retrieving the same from that path to read the file content. in local its working. but when i upload to cloud its not wrking and says path not found.
I know somewhere its missing with file storage in cloud. Appreciate if you could share some insights here. Thanks