Skip to Content
Sep 25, 2017 at 01:51 PM

404 error when trying to call Servlet on deployed Java Service

392 Views Last edit Sep 26, 2017 at 07:51 AM 3 rev

Hello Community,

I'm developing a Java Service for the Sap Cloud Platform. It has a Servlet which overrides the doGet-Method and the doPost-Method. The Java Service is deployed on SCP.

I want to call this Servlet by making GET and POST-Requests from a SAPUI5 application to the Service. The SAPUI5 application is developed with the WebIDE and then also deployed on SCP. When starting the SAPUI5 application from the WebIDE its GET- and POST-Requests actually reach the Servlet on the deployed Java Service and everything works as intended, however after I deploy the SAPUI5 application to SCP and run it from there it receives a 404 error when making the GET-Request and a 405 error (Method not allowed) when making the POST-Request.

I have created a destination on SCP which points to the Java Service URL and use it in neo-app.json of the SAPUI5 application.

Any ideas why it works from the WebIDE but won't work after deployment?

Edit (additional information):

The requests are done by a sap.m.UploadCollection-Control (the Url is set in the uploadUrl attribute):

<UploadCollection id="UploadCollection" uploadUrl="/MyService/attachments/" ...>

Entry in neo-app.json:

	"path": "/MyService/attachments/",
	"target": {
		"type": "destination",
		"name": "MyService_Attachments"
	"description": "MyService Attachments"

Destination Configuration in SCP Cockpit:

Name: MyService_Attachments
Type: HTTP
Description: MyService Attachments
URL: https://<JavaApplication><AccountName>
Proxy Type: Internet
Authentication: AppToAppSSO

<- Additional Properties ->
TrustAll: true
WebIDEEnabled: true
WebIDESystem: My Service