Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 7735

oData service URL CORS (Cross-Origin Resource Sharing) in Tomcat 8 using tomcat CorsFilter ?

$
0
0

I developed SAPUI5 app which use this backend service url:

https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/

 

And to solve the well known issue - CORS (Cross-Origin Resource Sharing):

 

For local testing the service URL like this:

proxy/https/sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/

Works fine for local testing.

 

But my question is about Production Tomcat server hosting the SAPUI5 app,

I followed the instruction here:

Apache Tomcat 8 Configuration Reference (8.0.18) - Container Provided Filters

To apply the CorsFilter from tomcat 8 so that I can solve the service url to work.

 

and added the filter to web.xml file like this:

2015-02-08 19_18_42-Java EE - create-sales-order_WebContent_WEB-INF_web.xml - Eclipse.png

 

and changed the service URL in the SAPUI5 App file like this:

2015-02-08 19_20_30-Java EE - create-sales-order_WebContent_view_App.controller.js - Eclipse.png

 

and Deployed the SAPUI5 app to the Tomcat 8 server.

 

But still getting this error:

2015-02-08 19_31_17-Create Sales Order.png

 

Any idea how to make the Tomcat CorsFilter work?


Viewing all articles
Browse latest Browse all 7735

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>