首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java相关 >

HttpClient 里头 httpPost、setEntity提交的,在后台通过什么方式接收值

2013-09-06 
HttpClient 里面 httpPost、setEntity提交的,在后台通过什么方式接收值HttpPost httpPostnew HttpPost(pos

HttpClient 里面 httpPost、setEntity提交的,在后台通过什么方式接收值

HttpPost httpPost=new HttpPost(posturl);
//建立一个NameValuePair数组,用于存储欲传递的参数
List params=new ArrayList();
//添加参数
params.add(new BasicNameValuePair("start", "0"));
params.add(new BasicNameValuePair("size", "14"));
params.add(new BasicNameValuePair("sortType", "hot"));

try {
//设置编码
httpPost.setEntity(new UrlEncodedFormEntity(params,HTTP.UTF_8));
//发送Post,并返回一个HttpResponse对象  
HttpResponse response = client.execute(httpPost);


中间的这个params的值在服务器有什么方式来接收啊
httpPost.setEntity(new UrlEncodedFormEntity(params,HTTP.UTF_8));


大神指点、在线等.... HttpClient? httpPost setEntity 参数 接收
[解决办法]
request.getparameter?
[解决办法]
引用:
request.getparameter?


+1024

管你什么东西提交的请求,在服务器端都servlet容器封装成httprequest

热点排行