如何实施 JSONP 进行自动建议?

发布于 2024-10-10 04:09:30 字数 178 浏览 0 评论 0原文

我需要实现跨域自动建议功能,其中必须检索一个域(例如 www.example1.com)的结果并将其发送到实际请求发生的另一个域(例如 www.example2.com)。 JSONP 似乎是此类跨域问题的流行答案。 服务器端编程语言是Java。 如果有人对服务器端所需的更改有任何指示,以及如何构造结果才能发送回其他域,我们将不胜感激。

I need to implement a cross domain auto-suggest functionality where the results from one domain, say www.example1.com, must be retrieved and sent to another domain, say www.example2.com, from where the actual request is happening.
JSONP seems to be a popular answer to such cross domain problems.
The server side programming language is Java.
If anyone has any pointers on the server side changes required, and how the results must be structured to be sent back to the other domain, it would be greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文