This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Yes gowher, I have the same problem. I agree with Vivek, you can setMaxAge() to the cookie and send it to browser, but when you get the cookie from the browser, the information of the cookie is not complete(maxAge lost..). So you cannot get correct maxAge.
But when you check the cookie information in the browser(i use FF), you can see the correct answer there.
SRV4.6 Typically, the only information that the client sends back as part of a cookie is the cookie name and the cookie value. Other cookie attributes that can be set when the cookie is sent to the browser, such as comments, are not typically returned.