小程序:连接到其他主机
你好,
现在,在我的一个站点小程序中,从 A 主机加载,它应该与 乙主机。但是当我尝试这样做时,我得到了
java.security.AccessControlException:访问被拒绝(java.net.SocketPermission MY_URL:443 connect,resolve)
异常。小程序已签名。我也将 crossdomain.xml 添加到 B 主机,但这没有帮助。
这个问题有什么解决办法吗?
跨域.xml:
<?xml version="1.0"?>
<!-- http://192.168.0.199/crossdomain.xml -->
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*"/>
<allow-http-request-headers-from domain="*" headers="Authorization,X-HTTP-Method-Override"/>
</cross-domain-policy>
Hallo,
Now, in my one site applet loads from A host and it should work with
B host. But When I tried to do it I got
java.security.AccessControlException: access denied (java.net.SocketPermission MY_URL:443 connect,resolve)
exception. Applet is signed. I have added crossdomain.xml to B host too, but it is not help.
Are there any solution of this issue?
crossdomain.xml:
<?xml version="1.0"?>
<!-- http://192.168.0.199/crossdomain.xml -->
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*"/>
<allow-http-request-headers-from domain="*" headers="Authorization,X-HTTP-Method-Override"/>
</cross-domain-policy>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为没有解决办法。小程序只能与下载它的服务器联系。问候, - MS
I dont think there is a solution. An applet is allowed to contact only the server that it has been downloaded from. Regards, - M.S.