那就需要些一个能解释asp代码的server。类似一个虚拟机。
但是这么做没什么意义。肯定不会比微软的iis快。

解决方案 »

  1.   

    不明白,只是想做个浏览器,怎么会和server有关?
    有人告诉我说用eclipse swt 的browser可以实现,正在学eclipse中……
      

  2.   

    对asp不能正常显示? 应该不会吧
    这类文件都是先解释过再由服务端发送到客户端来的,相当于html一样你是不是你他看你本机的 asp 文件,而本机的服务器没开?//错了不要劈偶
      

  3.   

    浏览器是客户端的,即使ie也只能解释html和js
    asp和jsp,php,cgi等等一样,都是服务器端执行的程序
    你想解释asp,那就是写服务器端了
      

  4.   

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.net.URL;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import java.io.*;
    public class HtmlBrower extends JFrame  implements ActionListener,HyperlinkListener
    {
       Container contentpane;
       JLabel labelprompt = new JLabel("ÇëÊäÈëURL");
       JPanel jpanelmain = new JPanel(new GridBagLayout());
       JTextField textfieldurl = new JTextField(10);
       JEditorPane jeditorpane = new JEditorPane();
       public HtmlBrower()
       {
          try
      {
          jbInit();
      }
      catch(Exception e)
      {
         e.printStackTrace();
      }
       }
       private void jbInit() throws Exception
       {
          contentpane = this.getContentPane();
          textfieldurl.addActionListener(this);
      jeditorpane.setEditable(false);
      jeditorpane.addHyperlinkListener(this);
      int h = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
      int v = ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
      JScrollPane jsp = new JScrollPane(jeditorpane,v,h);
          jpanelmain.add(labelprompt,new GridBagConstraints(0,0,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,
        new Insets (0,0,0,0),0,0));
      jpanelmain.add(textfieldurl,new GridBagConstraints(0,1,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,
        new Insets (0,0,0,0),0,0));
      jpanelmain.add(jsp,new GridBagConstraints(0,2,1,1,1,1,GridBagConstraints.WEST,GridBagConstraints.BOTH,
        new Insets (0,0,0,0),0,0));
      contentpane.add(jpanelmain,BorderLayout.CENTER);
      setTitle("mini IE");
      setSize(600,500);
      this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      this.setVisible(true);   }
       public void actionPerformed(ActionEvent ae)
       {
         try
     {
        String str_url = textfieldurl.getText().trim();
    if (!str_url.startsWith("http://www."))
    {
       if (str_url.startsWith("www."))
       { 
           str_url = "http://"+str_url;
       }
       else
          str_url = "http://www."+str_url;
      
    }

        jeditorpane.setPage(str_url);
     }
     catch(IOException ioe)
     {
        JOptionPane.showMessageDialog(this,"URL µØÖ·²»ÕýÈ·£º "+textfieldurl.getText().trim(),"ÊäÈë²»ÕýÈ·",JOptionPane.ERROR_MESSAGE);
     }
          
       }
       public void hyperlinkUpdate(HyperlinkEvent hle)
       {
         if (hle.getEventType() == HyperlinkEvent.EventType.ACTIVATED) 
     {
      try 
    {
          jeditorpane.setPage(hle.getURL());
      }
    catch (IOException t)
    {
        JOptionPane.showMessageDialog(this,"´ò¿ªÁ¬½Óʧ°Ü!","ÊäÈë²»ÕýÈ·",0);
          t.printStackTrace();
      }
     
       }   }
       public static void main(String[] args)
       {
           new HtmlBrower();
       }
    }
    楼上的 ,这样写确实不能正常打开 sina   163  chinaren 网