你的调用Applet的网页源码呢??贴出来!
估计:
1.使用了Java2,没有安装Java插件。
2.安装了Java插件,但是网页用的是Applet标签,不是Object。
先得知道你出错的原因才能解答。

解决方案 »

  1.   

    <applet
      codebase = "."
      code     = "huadi.TestApplet1.class"
      name     = "TestApplet"
      width    = "400"
      height   = "300"
      hspace   = "0"
      vspace   = "0"
      align    = "middle"
    >
    </applet>
    package huadi;import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.io.*;
    import java.net.*;
    import javax.swing.*;public class TestApplet1 extends JApplet implements Runnable {
        private boolean isStandalone = false;
        private JTextField messageText = new JTextField();
        Thread animator;
        int frame;
        int delay;
        String message;    //Get a parameter value
        public String getParameter(String key, String def) {
            return isStandalone ? System.getProperty(key, def) :
                    (getParameter(key) != null ? getParameter(key) : def);
        }    public TestApplet1() {}    public void start() {
            animator = new Thread(this);
            animator.start();
        }    public void run() {
            while (Thread.currentThread() == animator) {
                repaint();            try {
                    Thread.sleep(delay);
                } catch (InterruptedException e) {
                    break;
                }            frame++;
            }
        }    public int getNumber(){
            try {
                URL url = new URL("http://127.0.0.1:8080/huadiOfficeSystem/getThreadList.jsp");
                java.net.URLConnection connect = url.openConnection();
                connect.setUseCaches(false);
                //System.out.println("connection start");
                //showStatus("open connection!");
                //下次连接不用Cache            connect.setDefaultUseCaches(false);
                //这次连接也不用Cache
                //connect.setUseCaches(false);
                //打开?流用于读数据
                //connect.setDoInput(true);
                //不能用于写数据
                //connect.setDoOutput(false);
                //服务器与客户的真正连接
                //connect.connect();
                //p("Made connection to "+connect);
                //showStatus("Open Stream!");
                DataInputStream in = new DataInputStream(connect.getInputStream());
                //showStatus("reading!");
                message = in.readLine();            in.close();
                }catch(MalformedURLException e2)
                {
                    //System.err.println("MalformedURLException!");
                    //e2.printStackTrace(System.err);
                    //showStatus("MalformedURLException!");
                    }catch(IOException e1)
                    {
                        //System.err.println("IOException!");
                        //e2.printStackTrace(System.err);
                        //showStatus("IOException");
                    }            int l = Integer.parseInt(message);
                return l;
        }
        public void paint(Graphics g) {
            Color bg = getBackground();
            int l = getNumber();
            g.setColor(Color.black);
            g.drawRect(10,100,5*l,20);
            g.drawString("现在+ l +" 用户", 10, 140);
            oldNumber = l;
        }    //Initialize the applet
        public void init() {
            try {
                jbInit();            delay = 2000;
            }
            catch(Exception e) {
                //e.printStackTrace();
            }
        }
        //Component initialization
        private void jbInit() throws Exception {
      
        }
        public String getAppletInfo() {
            return "Applet Information";
        }
        //Get parameter info
        public String[][] getParameterInfo() {
            return null;
        }    void messageText_actionPerformed(ActionEvent e) {    }
    }
    我是新手,请多多帮助,谢谢
      

  2.   

    你的Applet的class文件放在那里了?
    不能放在WEB-INF/classes目录下.