我正在使用 java 开发一个 Web Start 客户端。我需要连接到其他服务器,而不是下载客户端的服务器。我以为我需要在我的 jar 上签名,但是 this (http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/signing.html)文档描述了:
Accessing services on web sites other than the RIA's own domain – In the past, RIAs could only communicate with the server from which they were launched. The Java Plug-in software and the Java Web Start software now support cross-domain policy files. If a third-party site has set up cross-domain policies and allows access from other domains, your unsigned RIAs can invoke services from this site.
这是什么意思,如何设置以及什么是跨域策略文件?
谢谢。
最佳答案
这是一篇博客文章 describing using crossdomain.xml with Java .
基本上,您需要在要调用的 Web 服务的服务器上放置一个 crossdomain.xml 文件,该文件允许启动您的应用程序的域。
关于java - 访问 Web 启动客户端自己的域以外的网站上的服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4034818/