title: jersey adding a cookie and then doing a redirect
body: <p>I am trying to set a cookie for the below domain and doing a 307 redirect. However, the the cookie doesnt seem to be getting set and is not present on subsequent requests from the browser. Anything that i am missing?</p>
  
  <pre><code>import javax.ws.rs.*;
  import javax.ws.rs.core.*;
  
  public Response getUserInfo() {
       try {
           return Response.temporaryRedirect(new java.net.URI(this.loginResponseRedirectUrl))
               .cookie(new NewCookie("xxxx", "value", "/", ".test.net", 1, null, 24*60*60, false ))
               .build();
  
       } catch(Exception e) {
           System.out.println("REDIRECT EXCEPTION " + e.getMessage());
       }
  }
  </code></pre>