android客户端可以获得服务器session中的值吗
2个回答
展开全部
转:
发送sessionid到服务器
HttpPost request = new HttpPost(url);
request.setHeader("Cookie", "JSESSIONID="+sessionId);
获取服务器返回的sesionid
DefaultHttpClient client = new DefaultHttpClient();
CookieStore mCookieStore = client.getCookieStore();
List<Cookie> cookies = mCookieStore.getCookies();
然后遍历下cookies就能找到JSESSIONID了
发送sessionid到服务器
HttpPost request = new HttpPost(url);
request.setHeader("Cookie", "JSESSIONID="+sessionId);
获取服务器返回的sesionid
DefaultHttpClient client = new DefaultHttpClient();
CookieStore mCookieStore = client.getCookieStore();
List<Cookie> cookies = mCookieStore.getCookies();
然后遍历下cookies就能找到JSESSIONID了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询