跨域应用集成?
我的公司有一个 Java Web 应用程序,其中包含产品目录功能。我们正在寻找一种将目录集成到其他站点的方法,而无需编写服务器端代码(在外部站点上)。我只是在寻找关于人们可能会做这样的事情的建议......?
My company has a Java webapp that contains a product catalog feature. We are looking for a way to integrate the catalog into other sites in a way that no server side code would need to be written(on the external sites). I'm just looking for suggestions for ways that one might go about doing something like this... ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否假设其他网站会将您的 Javascript 软件包含到他们的 html 页面中?
如果是这样,您可以向其他站点提供 javascript include 语句,该语句将从您的服务器中提取 javascript。然后,您的 JS 库将使用 JSONP 从服务器提取数据。
一切都将跨域工作。可以使用您的库将查找的 JS 变量来设置 JS 库的用户界面选项。
Are you assuming that the other sites will include your Javascript software into their html pages?
If so, you can provide the other sites with a javascript include statement that will pull the javascript from your server. Your JS library will then pull the data from your server using JSONP.
It will all work cross-domain. User Interface options to your JS library can be set using JS variables that your library will look for.
还要认真研究 CORS
一种方法允许 xmlhttp 在 IE8 和 FF 3.5+ 中毫无问题地访问您的网站
Also have a serious look into CORS
A way to allow xmlhttp to access your site without problems in IE8 and FF 3.5+