title: How to get the JSESSIONID from a HTTP request using ContainerRequestContext?
body: <p>I have the following HTTP headers in a request and I want to extract the <code>JSESSIONID</code> from it:</p>
  <pre class="lang-none prettyprint-override"><code>Accept=application/json
  Accept-Encoding=gzip
  deflate,Accept-Language=en-us
  Connection=keep-alive
  Content-Length=0
  Content-Type=application/json
  Cookie=JSESSIONID=ss0ox8w99o9142b73rssvc0r
  Host=localhost:8080
  User-Agent=Test_QA/34 CFNetwork/711.5.7 Darwin/14.5.0 (x86_64)
  </code></pre>
  <p>I'm using a <code>ContainerRequestContext</code> as following:</p>
  <pre class="lang-java prettyprint-override"><code>@Override
  public void filter(final ContainerRequestContext requestContext) throws IOException {
      System.out.println(&quot;***HEADER VALUE**: &quot; + requestContext.getHeaderString(&quot;Cookie&quot;));
  }
  </code></pre>
  <p>Getting result as:</p>
  <pre class="lang-none prettyprint-override"><code>JSESSIONID=zv71od6l2fd41hv6yf0980khy
  </code></pre>
  <p>And:</p>
  <pre class="lang-java prettyprint-override"><code>@Override
  public void filter(final ContainerRequestContext requestContext) throws IOException {
      Map&lt;String, javax.ws.rs.core.Cookie&gt; clientCookie = requestContext.getCookies();
      System.out.println(&quot;Client Cookie Map: &quot; + clientCookie);
  }
  </code></pre>
  <p>Getting result as:</p>
  <pre class="lang-none prettyprint-override"><code>Clinet Cookie Map: {JSESSIONID=JSESSIONID=1of1x5u1s1l4hdxfg2azlep42}
  </code></pre>
  <p>What is the best way to extract the <code>JSESSIONID</code> from the request?</p>