Fran,

Try putting an L after at least one of the numbers in parentheses:

nowLong = nowLong + (1000L * 60 * 60 * 24 * 30); // 30 dias

HTH,
Chad

On Mar 4, 4:25 pm, Fran <[email protected]> wrote:
> I cant write a cookie in GWT.
>
> This is the code:
>
>                         String ckValue = Cookies.getCookie("nameCookie");
>                         if(ckValue == null){
>                                 Date now = new Date();
>                                 long nowLong = now.getTime();
>                                 nowLong = nowLong + (1000 * 60 * 60 * 24 * 
> 30);// 30 dias
>                                 now.setTime(nowLong);
>
>                                 Cookies.setCookie("nameCookie", 
> "valueCookie", now);
>                         }
>
> Always ckValue is null.
>
> Anybody know this problem?
> Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to