java - 访问 Web 启动客户端自己的域以外的网站上的服务?

标签 java jakarta-ee java-web-start

我正在使用 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/

相关文章:

java - 使用 Mockito 的 ClassCastException

java - netbeans 中的 Tomcat 堆大小增加以及如何查找当前堆大小

spring - 从与 Spring 同时加载的非 spring 组件访问 Spring 上下文

java - 为什么 Java Web Start 说已签名的 jar 文件未签名?

java - 我可以在 Appletviewer 中通过 Java Web Start 启动小程序吗?

java - Java 中监听器的用途是什么?

java - hibernate什么时候加载映射关系

jakarta-ee - 如何将 .properties 文件中的值包含到 web.xml 中?

Java 7 list 安全更改

java - 使用对帐户可行的 getter 和 setter 函数?