签名的java小程序有限制吗?

发布于 2024-08-12 06:28:41 字数 143 浏览 4 评论 0原文

我写了一个java小程序并对其进行了自签名。当我在 eclipse 中运行它或作为可执行 jar 运行它时,它工作正常。但是当我上传它时,它什么也没做。它加载了,并且确实出现了自签名证书警告,我单击“是”但没有任何反应。我的印象是签名的小程序没有任何限制。可能是什么问题?

I wrote a java applet and self signed it. When I run it in eclipse or as a executable jar it works fine. But when I upload it, it doesn't do anything. It loads, and the self signed cert warning does come up and I click yes but nothing. I was under the impression that signed applets had no restrictions. What could be the problem?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

尛丟丟 2024-08-19 06:28:41

您使用证书签署您的小程序。如果该证书不是来自“现实生活”情况下的 Thawte 等权威机构,则您的小程序将不会被浏览器认为是安全的,除非用户通过放宽 Jaca 策略(或接受自签名证书)明确授予您访问权限。 Eclipse 等开发工具内置了宽松的策略,因此您不会遇到问题,

而且定价为 相当僵硬

You sign your applet with a certificate. If that cert doesn't come from authority such as Thawte in "real life" situation your applet will not be considered safe by your browser without user explicitly granting you access by relaxing Jaca policy (or accepting self-signed cert). Dev tools such as Eclipse have that relaxed policy built in so that's why you don't have a problem

And the pricing is pretty stiff

也只是曾经 2024-08-19 06:28:41

请参阅 http://java.sun.com/docs/books /tutorial/deployment/applet/security.html。我引用:

当从 HTML 页面中的 JavaScript 代码访问已签名的小程序时,该小程序将在安全沙箱中执行。这意味着签名的小程序本质上表现得像未签名的小程序。

像这样签署小程序代码除了弹出安全警告对话框之外没有任何效果。

除了“我创建一个 applet jar 并将其上传到我的服务器,然后在 HTML 页面的 applet 标记中引用它”之外,“当我上传它时,它不会执行任何操作”可能意味着很多事情当我打开页面时,会弹出安全警告对话框,但我单击它,但没有进一步发生”。

See http://java.sun.com/docs/books/tutorial/deployment/applet/security.html. I quote:

When a signed applet is accessed from JavaScript code in an HTML page, the applet is executed within the security sandbox. This implies that the signed applet essentially behaves likes an unsigned applet.

Signing applet code like this has no effect except popping a security warning dialog.

There are a number of things you might have meant by "when I upload it, it doesn't do anything" other than "I create an applet jar and upload it to my server, then reference it in an applet tag of an HTML page and when I open the page, the security warning dialog pops up but I click it and nothing further occurs".

并安 2024-08-19 06:28:41

当您希望小程序存储信息(例如cookie)时,您需要参数“mayscript”。

<applet code="MainApp.MainClass.class" height="645" mayscript="" width="100%">
    <param name="archive" value="MainApp.jar" />
</applet>

希望这有帮助

You need The parameter "mayscript" when you want your applet to store information e.g. on cookies.

<applet code="MainApp.MainClass.class" height="645" mayscript="" width="100%">
    <param name="archive" value="MainApp.jar" />
</applet>

Hope this helps

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文