请问用httpclient模拟登录http://jw.zhku.edu.cn/jwmis/_data/index_LOGIN.aspx
这个网站的思路是什么
------解决思路----------------------
用HttpClient
public void login() throws IOException {
PostMethod post = new PostMethod("http://jw.zhku.edu.cn/jwmis/_data/index_LOGIN.aspx");
post.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");
//你要登录,需要的参数
NameValuePair[] param = {
new NameValuePair("Sel_Type","STU"),
new NameValuePair("txt_asmcdefsddsd","xxx"),
new NameValuePair("txt_pewerwedsdfsdff","xxxxxxx"),
new NameValuePair("txt_sdertfgsadscxcadsads","xxxxx") } ;
post.setRequestBody(param);
post.releaseConnection();
HttpClient httpClient = new HttpClient();
httpClient.executeMethod(post);
//这个请求对应的方法,输出是否登录成功的结果,用户json格式的字符串,
String response = post.getResponseBodyAsString();
//response得到这个返回值,转成json类型,就可以了啊
}