I have a denodo returning json data. My tomcat domain is different than that of the the denodo domain. I do not have much idea if denodo would support jsonp or CORS. If it doesn't support I need to go with more traditional approach of proxy servlet for the tomcat to access the data from other domain. Please let me know if anyone has any suggestions or solutions
1 Answers
CORS support:
Denodo uses an Apache Tomcat as its embedded web container. In order to enable CORS to the services provided, you would need to configure this Tomcat. As the version used is previous than the 7.0, the CORS filter is not direcly supported in this tomcat. You have to provide an external one.
For instance, you can use this implementation: software.dzhuvinov.com/cors-filter.html
and place the jar files cors-filter-.jar and java-property-utils-.jar files from CORS-filter under: /resources/apache-tomcat/common/lib
To enable CORS for a specific REST web service, you have to add a filter like this to web service's web.xml file:
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/views/*</url-pattern>
</filter-mapping>
Add this filter as the first in the filter section and restart the web container.
I've found this information in this link: https://community.denodo.com/kb/view/document/Northbound%20Connections/CORS%20support%20on%20the%20embedded%20Apache%20Tomcat
JSONP support:
Denodo does provide support for jsonp as it is explained in the documentation. To obtain JSON with padding just add the parameter $jsoncallback to the URL, along with the name of the function.

- 116
- 4
-
1Thanks, I think its working. I used `url...?$format=json&$jsoncallback=js_function` – user525146 Apr 15 '15 at 16:54