-3

In my GWT Web Application I want to save some of my app-s data in user's browser cookies. Such as Layout condition, that are changing by user. How can I do this?

Sednus
  • 2,095
  • 1
  • 18
  • 35
Lasha Gureshidze
  • 147
  • 2
  • 10

2 Answers2

0

Simple! look at: http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/Cookies.html

Also take a look at Window object

futuretelematics
  • 1,453
  • 11
  • 23
0

In GWT there is a class

import com.google.gwt.user.client.Cookies;

Is it what you are looking for

//get  cookie with name of the cookie
    String msg = Cookies.getCookie("cookiename");


    //set cookie  with name 

    Cookies.setCookie("cookiename",msg);

Remeber cookie with no value returns null .

Suresh Atta
  • 120,458
  • 37
  • 198
  • 307