Java cookie值

时间:2013-03-12 16:08:18

标签: java jquery

在Android应用中,我在用户登录成功后使用查询JS文件设置了cookie。

$.cookie('id', rtndata.cb_id, { expires: 365 });

对于同一个Android应用程序中的后台进程,我需要记录在该cookie中的值。 我需要cookie值的Java类的部分如下:

try {
  httpClient = new DefaultHttpClient();
  getMethod = new HttpGet("http://somedomain.com/m/list.php?id=the_value_from_the_cookie");
  response = httpClient.execute(getMethod);
  responseStream = response.getEntity().getContent();

  StringBuilder dataString = new StringBuilder();

是否可以从此Java类文件中的cookie中获取值并将其放在newHttpGet中的“the_value_from_the_cookie”部分?

0 个答案:

没有答案