Java小程序网络连接 [英] Java Applet Network Connection

查看:126
本文介绍了Java小程序网络连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前时刻,当我的小程序的Web浏览器,它是从进行任何外界堵塞运行
网络连接。是否有可能更改任何设置,以允许它进行连接?

At the moment when my applet runs in a web browser it is blocked from making any outside network connections. Is it possible to change any settings to allow it make connections?

从桌面运行时,它工作正常,但是当在浏览器中会限制它。

It works fine when run from the desktop, but when in a browser it restricts it.

感谢

〜凯尔摹

推荐答案

小程序可以连接到他们曾经下载​​的服务器(同源策略)。从6u10中,他们也可以与相应的的crossdomain.xml 文件(google一下)。访问网站

Applets can connect back to the server they were downloaded from ("same origin policy"). From 6u10 they can also access sites with appropriate crossdomain.xml file (google it).

随机允许访问的任何网站显然不会是良好的安全性。您可以登录您的code和有插件允许用户删除安全。但是,你需要知道的安全做安全的(大多数人不)。对于好安全对话需要由受信任的证书颁发机构签署的证书。

Randomly allowing access to any site obviously isn't going to be good for security. You can sign your code and have the PlugIn allow users to remove security. However, that requires you know about security to do it safely (which most people don't) . For a "nice" security dialog you need a certificate signed by a trusted certificate authority.

另一种选择是让你的Web服务器转发机上的连接。然而,又是棘手的安全做。

Another option is to have your web server machine forward on connections. However, that again is tricky to do securely.

这篇关于Java小程序网络连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆