输出?怎么输出?如果通过FORM的话,你直接输出到你的servlet里,这样在你的servlet里用request类的方法就可以得到你想要的值了

解决方案 »

  1.   

    package com;import java.net.*;
    import java.io.*;public class serverSend 
    {
    public  String setURL(String serviceid,String fromserver,String phone,String fromphone,String message,String restype,String rescontent) 
    {
    String result="没有结果!";
    try{
    String urlName = "http://..........bsend?status=1&serviceid="+serviceid+"&fromserver="+fromserver+"&tophone="+phone+"&fromphone="+fromphone+"&subject="+message+"&restype="+restype+"&rescontent="+rescontent;
    URL url = new URL(urlName);
    URLConnection connection = url.openConnection();
    connection.connect();
    BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
        String line;
        if ((line = in.readLine()) != null)
        {
         result = line; //.substring(line.indexOf("|")+1)
        }
        in.close();
    }catch(Exception e){
    System.out.print(e);
    }
    return result;
    }
    }我已经找到一个方法了