title: Extracting _WL_AUTHCOOKIE_JSESSIONID cookie
body: <p>I am facing a problem while retrieving cookie over https for an application deployed on weblogic. I am using below code.</p>
  
  <pre><code>HttpURLConnection huc3= (HttpURLConnection) new URL(url1).openConnection();
  huc3.setRequestMethod("POST");
  BufferedReader in = new BufferedReader(
      new InputStreamReader(huc1.getInputStream()));
  
  huc3.setDoOutput(true);
  DataOutputStream wr3 = new DataOutputStream(huc3.getOutputStream());
  wr3.writeBytes("Username=abc&amp;password=xyz");
  wr3.flush();
  wr3.close();
  
  String thirdCookie = huc3.getHeaderField("Set-Cookie");
  </code></pre>
  
  <p>Problem here is, I am able to retrieve "JSESSIONID", but I am not able to retrieve "_WL_AUTHCOOKIE_JSESSIONID". Which is secure cookie and required to make subsequent authenticated call.</p>
  
  <p>I application deployed over weblogic doesn't have https enabled, then only JSESSIONID is generated on authentication, and works fine.</p>
  
  <p>But on HTTPS it generate another cookie which I am not able retieve.</p>
  
  <p>If I use cookie manager and do in a standalone application</p>
  
  <pre><code>CookieManager cookieManager = new CookieManager();
  cookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ALL);
  CookieHandler.setDefault(cookieManager);
  </code></pre>
  
  <p>it works fine. But i have following questions:</p>
  
  <p>1.I want to know how to extract "_WL_AUTHCOOKIE_JSESSIONID" with out using CookieManger?</p>
  
  <p>2: is, if I put this code in web application and deploy on weblogic, it stops working. Why?</p>