当前位置:编程学习 > wap >>

android 客户端(非浏览器)怎么与服务器session保持同步会话

小弟在做一个客户端的购物车功能,要获取到服务器session中保存的购物车列表,上传了sessionid却依旧没法获取到购物车,代码在下面:
String urlString = "http://192.168.1.128:8080/Pinzhuo04/servlet/ShowCartServlet";
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(
urlString).openConnection();
httpURLConnection.setRequestProperty("cookie", sessionid);
httpURLConnection.setConnectTimeout(5000);
httpURLConnection.setRequestMethod("POST");
if (httpURLConnection.getResponseCode() != -1) {
InputStream inputStream = httpURLConnection.getInputStream();
return XMLparse(inputStream);
} session android --------------------编程问答-------------------- http://blog.csdn.net/chindroid/article/details/7556363 --------------------编程问答-------------------- http://blog.csdn.net/chindroid/article/details/7556363
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,