package cndr;import com.meterware.httpunit.*;
import java.io.IOException;
import java.net.MalformedURLException;
import org.xml.sax.SAXException;import share.sys.Logs;public class Sms{
  public boolean sendSms(String msg,String mobile) throws IOException,MalformedURLException,SAXException{
    try{
          WebConversation wc = new WebConversation();
      WebResponse wr = wc.getResponse("http://210.51.188.143:8088/51sms/Delsms.action?customernum=81&mycontent=" + msg + "&password=123456&mobile=" + mobile);
      String result=wr.getText();
          Logs.logout(result);
          Logs.logout("短信:http://210.51.188.143:8088/51sms/Delsms.action?customernum=81&mycontent=" + msg + "&password=123456&mobile=" + mobile);
      return true;
        }catch(Exception e){
           return false;
        }
  }
}总是提示import com.meterware.httpunit.*;有错
请各位帮帮我啊!

解决方案 »

  1.   

    错误信息不帖出来,光看你那些代码的话是不能解决问题的!有可能某些原来引用的jar文件不存在了
      

  2.   

    很可能com.meterware.httpunit.*;的包丢了,是不是误删了。........
      

  3.   

    这里看看可能对你有比较深的了解http://www.58ip.com/?user=kettly800730
      

  4.   

    应该是httpunit包,没有导到工程里去,你重新导一下包应该就可以了