Search code examples
gwtgwt-rpcgxtgwt2gwt-ext

Session Variables


How can i add Session Variable visible to the whole application in GWT?

like in C# you would do something like

Session.Add("mySessionVal", "Hello");

How do you do this in GWT?

Thank you


Solution

  • GWT is client side, web sessions are server-side.

    GWT applications are not typical page-by-page web application. You always stay on the same page (check URL bar in browser).

    So, you can simply set a global (public static) field in some class and it will be visible by all other objects in GWT app.