Skip to Content

Could not access Java servlet on SAP Cloud Platform

I'm trying to create a Java servlet in Eclipse that is deployed to SAP Cloud Platform (SCP), servlet connects to a on-premise backend system following this tutorial [1]. I have setup a local sample app simulating a backend server and exposed using Tomcat following this tutorial [2]. I am trying to run the app in Eclipse using Run As -> the SCP account but I'm getting 404 not found error.

My SCC mapping is all green..

And my Destination in SCP and in Eclipse are correctly configured.

Expected output is below.. It works if I run the app directly in local:

Please help me.. I'm on my 16th hr and still cannot solve it. :(



scc.png (77.6 kB)
dest.png (22.0 kB)
tom.png (6.0 kB)
404.png (35.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 23, 2018 at 03:02 PM

    Hi Michael,

    Have you created an HTTP destination in cloud platform?

    Does the cloud connector connects to the same account?

    Is there any location ID configured?

    Could you check if the HTTP destination can reach the backend system from cloud platform?

    If the HTTP destination connection check is fine, I suggest increasing the trace level in cloud connector to All and setting the payload trace flag to see the communication between backend and cloud.

    Best regards,


    Add comment
    10|10000 characters needed characters exceeded

  • May 07, 2018 at 09:52 PM

    Hi Michael,

    Step 5 doesn't tell you to edit the destination on Eclipse. It tells you to create the destination on the cloud cockpit. You could maintain the destination via Eclipse and import the file (it is a file that can be found under on your workspace under project named "servers" --> tomcat<version> --> destinations). This is a simple flat file containing the same parameters as documented on step 5. Once you import this file via Cockpit, you should be able to use your application.

    Another issue you might have is that on SCP, your application will run under a context - which has the same name as the WAR file. Which is kind of confusing at first, because it already has the name of your app added to the hostname. But that's how it is.

    So, your URL might need some tweaking to add the application context name and then the servlet mapping - which in case of the exercise is "/". On a localhost machine you don't have that application context.

    In order to use the "/" just like on localhost, you will need to rename the WAR file to ROOT.WAR. This will prevent SCP from creating an application context and the URL will be just the same as on your localhost.


    Add comment
    10|10000 characters needed characters exceeded