你说的调用asp是什么意思?是不是把asp的结果include到jsp中?我原来试过调用远程的asp不成功,只有调用本地的才可以,也就是说你要把tomcat和iis整合在一起,使用同一个主目录,你可以自己试一下,也许会有新的发现。

解决方案 »

  1.   

    不是,我是要传值给asp页面,反正就是asp页面和jsp页面混合使用了,在同一个目录下,JSP是用Resin服务器,要怎么配置Resin服务器?
      

  2.   

    晕!既然这么简单还问别人?
    <%@ page contentType="text/html; charset=GBK" %>
    <%@ page import="java.net.*,java.util.*,java.io.*"%>
    <html>
    <head>
    <title>
    jsp1
    </title>
    </head>
    <body bgcolor="#ffffff">
    <h1>
    JBuilder Generated JSP
    </h1>
    <%
    URL url = new URL("http://www.bjbus.com/searchline/buslinesearch_2.asp?linename=355");
        URLConnection conn = url.openConnection();
        conn.setDoOutput(true);
        BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        //PrintWriter out1 = new PrintWriter(new BufferedWriter(new FileWriter("d:\test1.dat")));
        int lineCount = 1;
        String s = new String();
        while((s=in.readLine())!=null) {
          out.println(s);
        }
    %>
    </body>
    </html>