日期:2014-05-18 浏览次数:20795 次
package cn.zj.sunda.util;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.CookieStore;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.cookie.Cookie;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import cn.zj.sunda.R;
import android.content.Context;
import android.util.Log;
import android.widget.Toast;
public class ConnUtil {
private DefaultHttpClient hc = null;
private Context context;
// session
public static String server="http://192.168.1.5:8080/SWS";
public static String JSESSIONID = null;
/**
* 以POST方式提交表单
*
* @param url
* 服务器路径
* @param param