在asp里可以用xmlhttp对象实现,在jsp里怎么实现呢?

解决方案 »

  1.   

    在asp里可以用xmlhttp对象实现,在jsp里怎么实现呢?
      

  2.   

    jsp是在服务器端运行的,怎么可能发送到客户端,你是想给他源文件?呵呵
    或者生成一个html文件发送
      

  3.   

    不是什么客户端,我是发邮件,想发送个html页面给接受者,可以链接到某页面
      

  4.   

    那就给一个在html页面里给一个链接啊,不明白你的意思
      

  5.   

    就象一般垃圾邮件一样,可以直接看html页面
      

  6.   

    //这是发送html格式邮件的代码(包含文本形式)
    String title = "This is a html mail!";
    MimeMultipart content = new MimeMultipart("alternative");
    MimeBodyPart tt = new MimeBodyPart();
    MimeBodyPart hh = new MimeBodyPart();
    tt.setText(title);
    hh.setContent(body,"text/html");//body是邮件正文(里面应该包含要显示的html代码)
    content.addBodyPart(tt);
    content.addBodyPart(hh);
    message.setContent(content);
    message.saveChanges();Transport transport = session.getTransport("smtp");
    transport.connect(host,user,password);//写你的邮件服务器的smtp server,用户名,密码
    transport.sendMessage(message,message.getAllRecipients());
    transport.close();