Skip to Content

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 HTMLXML, 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

Prerequisites:

An account in SAP Cloud Platform

Eclipse JAVAEE IDE

Now Lets do this:

  1. Create a Project of type “Dynamic Web Project”
  2. 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 🙂

 

Rahul Kumar

To report this post you need to login first.

2 Comments

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

Leave a Reply