Hi Sriram,

maybe it is a bug in the JAX-RS implementation. I propose to set a break 
point in the getter of the age in NewCookie, and see, if it breaks 
there. If not, than it is a bug in the JAX-RS implementation.
If the program stops there, what is done with the value.

Another possibility: Sniff the http traffic and see, if the age is 
transfered If not, it is definitively a bug.

best regards
  Stephan

Sriram C schrieb:
> I have a couple of JAXRS resources built with restlet 2.0RC2 with Spring
> 3.0.1,  deployed on Tomcat 6.0.x. I set a browser cookie from a resource
> using the following logic:
>
> @GET
> @Path("/test")
> @Produces({"application/xml", "application/json", "text/plain"})
> public Response test(){
> NewCookie newCookie;
> Cookie cookie = new Cookie("testCookie", "test", "/", "localhost");
> newCookie = new NewCookie(cookie, "", 7776000, false);
> return Response.ok().cookie(newCookie).build();
> }
>
> The cookie is set fine on the browser, however the time period that I
> specified (7776000) doesn't seem to be getting applied. The cookie has an
> expiration of 'When the browser closes' basically a session cookie. The
> issue occurs regardless of when the domain is either localhost or a valid
> domain. This issue occurs on Firefox and also Chrome. What could be the
> causing the cookie age to be not set?
>
> Thanks
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2610481

Reply via email to