java - NewCookie.getMaxAge() always returns -1 -


I have two servers S1 and S2S2 is a REST API based server S1 is a HTTP server I have clients The request from S1 from the browser is requested. I retrieve request URI and request method and, on some conditions, calls a specific other API on S2. I am using Jersey Client to create these calls (VAR.1.17). Now, when I respond to the S2, I agree to remove a cookie from the reaction, i.e. cookie-domain, maxage, path etc. This is necessary because I need to create a new cookie from it and add it to the last response that S1 is going to send back the customer (I can not just find any other way to go to cookies on feedback from S1 Was). But when I retrieve the maximum number -

cookiemaxedge = cookie.getmaxage (); // This cookie is a purpose of javax.ws.rs.core.NewCookie

This gives 1 -1 so when I try to add new cookie to the last response, it is not created on the browser going.

Is there a bug in this jersey client or is there anything wrong? I tried to search for the answer but there was no LLCL. I am new to web programming and reis API please help

A tad is used late, but the cookie of -1 is used to create session based. This means that as soon as you close your browser session, the cookie timed out.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -