从另一个Java小程序访问Java小程序 [英] Accessing Java applet from another Java applet

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

问题描述

Web应用程序使用Java小程序,存储密码,由用户提交的,在一个私人财产,并在一些公共的方法使用该属性。

A web application uses a Java applet that stores a password, submitted by the user, in a private property and uses this property in several public methods.

我不知道是否有可能来自相同或不同的网站加载的另一个Java程序调用该applet的方法或可能访问包含密码的私有财产吧?

I wonder if it is possible for another Java applet loaded from the same or different web site to call the methods of this applet or possibly access the private property containing the password?

不要在相同或不同的JVM运行不同的小应用程序?如果他们在同一个JVM上运行,可以将一个小程序以某种方式到达另一个小程序运行的参考?

Do different applets run in a same or different JVMs? If they run in the same JVM, can one applet somehow get a reference to another running applet?

密码储存小程序签名。我是从假设一个想要得到密码探听小应用程序,也可以签订工作。

The password-storing applet is signed. I work from assumption that the snooping applet that wants to get the password can also be signed.

推荐答案

您可以使用的 AppletContext 得到从一个小程序到另一个引用。目前的小应用程序必须知道什么结果强制转换成如果你要调用比那些由 Applet的类本身定义的其他任何公开的方法。

You can use AppletContext to get a reference from one applet to another. The current applet will have to know what to typecast the result into if you want to call any public methods other than those defined by the Applet class itself.

这篇关于从另一个Java小程序访问Java小程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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