cancel
Showing results for 
Search instead for 
Did you mean: 

How can i create a servlet through SAP WEB IDE

Former Member
0 Kudos

Hi All,

I have to create a simple Hello World servlet as mentioned in the link below and deploy the same on the HANA Cloud Portal and then display through a widget

https://help.hana.ondemand.com/help/frameset.htm?e5a8b1d3bb571014a0f89bb4706d4e0b.html

http://hcp.sap.com/developers/TutorialCatalog/jav100_2_java_hello_world.html

Which project template do I need to follow for the Java EE perspective on the SAP WEB IDE just like we have in Eclipse.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Saket,

SAP Web IDE is for developing client applications.

What you can do is:

  1. deploy your java application (developed with Eclipse) on SAP HANA Cloud Platform.
  2. in Web IDE create new project from template > Cloud Portal SAPUI5 Starter Widget.
  3. call your servlet using ajax.

you can read about Create a Cloud Portal Widget from a SAP Web IDE Project Template

eliel_schurman
Participant
0 Kudos

Hello,


Please follow the documentation guide - Creating Cloud Portal Widgets in the SAP Web IDE

By using one of the templates, the opensocial spec xml is going to be created automatically. Make sure the first checkbox is checked (SAP UI5 integration [sap-xhrwrapper]). This feature is responsible to overcome cross domain problems.

Once the application is deployed to HCP, you will be able to see it under HTML5 Application menu entry in the cockpit.

Make sure you are activating it and setting a version (can also be done when deploying via Web IDE).

Now, follow step #6 in the guide to create a widget in cloud portal and you are ready to go.


Regards,

Eliel.

Former Member
0 Kudos

Hi Eliel,

Thanks for your response, let me elaborate on the requirement.

We want to create a custom application which would display the details of the user who is currently logged in SAP HANA Cloud Portal and display the same through a widget on the HANA Portal.

We want to use the following code sample for the custom application as mentioned in the link below:

https://github.com/SAP/cloud-sample-library/blob/master/library/src/main/java/com/sap/hana/cloud/sam...

What we are assuming, would the probable solution is by creating  a servlet  and deploy the same on Hana Cloud Platform as a java application and then figure out a way to display the same on the HANA Cloud Portal through a widget.

In order to create a servlet out of this code through the SAP WEB IDE i was thinking if we have something similar to JAVA EE perspective in eclipse where i could create the servlet and deploy on the SAP HANA Cloud. Similar to the wizard as mentioned in the link below

http://hcp.sap.com/developers/TutorialCatalog/jav100_2_java_hello_world.html

Once this is achieved then i would need to figure out a way to convert this to a widget.