asp 页面 title = request.Form("Title")
If title="" then
Response.end()
End If
Response.Write titlet = "中国";
HttpClient http = new HttpClient();
PostMethod post = new PostMethod("http://127.0.0.1/post.asp");
NameValuePair id = new NameValuePair("ChannelID", "1");
NameValuePair classid = new NameValuePair("ClassID", "248");
NameValuePair st = new NameValuePair("Title", t);
NameValuePair data = new NameValuePair("HtmlFileDate", yyyy+mm+dd+String.valueOf(System.currentTimeMillis()));
NameValuePair content = new NameValuePair("TextContent", c);
post.setRequestBody(new NameValuePair[] {id,classid, st,content,data});
http.executeMethod(post);
System.out.println(post.getStatusCode()+"----------");
String str = new String(post.getResponseBodyAsString().getBytes("iso-8859-1"),"GBK");
System.out.println(str+"\n\n");这里输出200----------
??
这乱码怎么解决啊
post.releaseConnection();
If title="" then
Response.end()
End If
Response.Write titlet = "中国";
HttpClient http = new HttpClient();
PostMethod post = new PostMethod("http://127.0.0.1/post.asp");
NameValuePair id = new NameValuePair("ChannelID", "1");
NameValuePair classid = new NameValuePair("ClassID", "248");
NameValuePair st = new NameValuePair("Title", t);
NameValuePair data = new NameValuePair("HtmlFileDate", yyyy+mm+dd+String.valueOf(System.currentTimeMillis()));
NameValuePair content = new NameValuePair("TextContent", c);
post.setRequestBody(new NameValuePair[] {id,classid, st,content,data});
http.executeMethod(post);
System.out.println(post.getStatusCode()+"----------");
String str = new String(post.getResponseBodyAsString().getBytes("iso-8859-1"),"GBK");
System.out.println(str+"\n\n");这里输出200----------
??
这乱码怎么解决啊
post.releaseConnection();
解决方案 »
- 为什么整数部分可以正常运算,小数点后面不行
- 如何在Button或者输入框中添加系统时间
- 传递类似整型指针的 整型包装类,java中有么
- 请问那位有Think in java这本书中的例子的原代码呀/还有课后习题的代码呀?
- 请教,如何穿透局域网的防火墙!!!
- Exception in thread "main" java.lang.NoClassDefFoundError: mypag/Time 哪位大哥帮帮小弟,这个问题我搞了一个下午了!!!SOS
- 请问如何即时刷新table中鼠标所选中的那条记录?程序代码见内。高分请教
- 我想用可视化的Java工具VisualCafe,哪里有不限制版?或有正版注册码?
- 谁知道那
- java String不可变问题
- 关于String.valueOf()和.toString的问题
- java中如何实现string的第一个字母大写
HttpClient client = new HttpClient();
client.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET, CONTENT_CHARSET);
http.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET, "GBK");还是一样