你的初步想发就会受到安全限制。
applet不能访问除自身以外的服务器。
除非用自身的代理。
感觉用applet来做真的很麻烦。

解决方案 »

  1.   

    能不能把问题具体描述一下,远程的网页中需要同步的是一部分数据还是所有的数据?如果是一部分数据,你试试下面的行不行:
    需要同步的数据做在Applet里,做成多线程的,走http协议跟服务器上servlet连接,这样就没什么安全限制了,我知道申银万国的股票实时分析图就是这样做的。
      

  2.   

    <html>
    <head>
    </head><body>
    <script language=javascript>
    document.write("<APPLET CODE='test.class' WIDTH=600 HEIGHT=100>");
    document.write("<PARAM name=url value='");
    document.write(window.location.href);
    document.write("'></applet>");
    </script>
    </body>
    </html>
    import javax.swing.*;    
    import java.awt.*;public class test extends JApplet {    public test() {
            getRootPane().putClientProperty("defeatSystemEventQueueCheck",
                                            Boolean.TRUE);
        }    public void init() {
    String strL = getParameter("url");
            JLabel label = new JLabel(
                               "You are successfully running a Swing applet!" +
    strL);
            label.setHorizontalAlignment(JLabel.CENTER);        label.setBorder(BorderFactory.createMatteBorder(1,1,2,2,Color.black));        getContentPane().add(label, BorderLayout.CENTER);
        }}
      

  3.   


    我在本地(也就是客户端)有一个applet,
    而在远程主机也有一个java程序(肯能使applet,也可能是application)两者通过socket进行通信,在客户端打开以web连接的同时(不同时也可以)
    我想要让远程主机上的程序控制其本地打开一个相同的连接(或者页面),
    所以不知道该怎么实现,
    主要是一些关键问题:如
    本地的applet怎样得到另一个ie窗口打开的连接;
    而远程的程序怎样控制其ie 同样打开一个这样的连接。====================================================狼的心.....................碎了。====================================================
      

  4.   

    而远程的程序怎样控制其ie 同样打开一个这样的连接。Runtime.getRuntime().exec("IEXPLORE.EXE " + url);传送可以用socket直接传文本, 如果远端是web可以用http
      

  5.   

    applet和网页不在一个窗口中打开,也可以用parameter传吗?这个问题......
      

  6.   

    1.用frame, 应该有windows.frame.location吧(我不知道你自己试)
    2.自己写个jni程序吧
      

  7.   

    applet不允许你做这些的,
    As the applet overview lesson mentioned, existing applet viewers (including Web browsers) impose the following restrictions: Applets cannot load libraries or define native methods. 
    Applets can use only their own Java code and the Java API the applet viewer provides. At a minimum, each applet viewer must provide access to the API defined in the java.* packages. An applet cannot ordinarily read or write files on the host that is executing it. 
    The JDK Applet Viewer actually permits some user-specified exceptions to this rule, but Netscape Navigator 2.0, for example, does not. Applets in any applet viewer can read files specified with full URLs, instead of by a filename. A workaround for not being to write files is to have the applet forward data to an application on the host the applet came from. This application can write the data files on its own host. See Working with a Server-Side Application for more examples. An applet cannot make network connections except to the host that it came from. 
    The workaround for this restriction is to have the applet work with an application on the host it came from. The application can make its own connections anywhere on the network. See Using a Server to Work Around Security Restrictions for an example. An applet cannot start any program on the host that is executing it. 
    Again, an applet can work with a server-side application instead. An applet cannot read certain system properties. 
    See Reading System Properties for more information.
      

  8.   

    有一个问题: 客户端连接是以socket打开的,那没有什么难题:socket+线程就可以了。但通信数据怎么解决?如果不是socket打开的时候有什么要求?
    我觉得楼主没有把问题说明清楚。
      

  9.   

    socket 是用来通信的,客户端的连接使用IE打开,而applet也必然在另一个IE理出现,因此我希望能够在applet得到另一个窗口里的连接参数
      

  10.   

    这个有很多种方法,不知道你服务器是什么操作系统,不知道你会不会别的语言?如果是Linux这种,可以用java编写一个服务器程序,在那运行,如果权限有限可以用servlet,象servlet也要以运行的象applacation一样。
      

  11.   

    有一点我要重申一下,服去器是什么不管我的事,我的所有处理都在客户端,
    我的applet的通信对象是远程的一个对等的客户端程序。我只要把我目前的一个网页连接发给它,问题是怎么得到我本地的这个连接,
    因为连接和applet不是在一个窗口内打开的。。