Cookies doesn't appears in Chrome Console Resources tab
Ok the problem was the path. To be visible in all the page the path must be "/"
cookie.setPath("/")
As far as I know this is the issue:
cookie.httpOnly = true
Which means the cookies are only used through HTTP and not available in Javascript. You have to set it to false to make them visible in Chrome.
More info: http://en.wikipedia.org/wiki/HTTP_cookie#HttpOnly_cookie
The HttpOnly attribute is supported by most modern browsers.[19][20] On a supported browser, an HttpOnly session cookie will be used only when transmitting HTTP (or HTTPS) requests, thus restricting access from other, non-HTTP APIs (such as JavaScript). This restriction mitigates but does not eliminate the threat of session cookie theft via cross-site scripting (XSS).[21] This feature applies only to session-management cookies, and not other browser cookies.