0

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

user710502
  • 11,181
  • 29
  • 106
  • 161

2 Answers2

1

This might suffice the purpose of accessing variables in the entire GWT application:

Developer's Guide - Client-side Storage (Web Storage)

Kijewski
  • 25,517
  • 12
  • 101
  • 143
orrexian
  • 24
  • 2
1

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.

Peter Knego
  • 79,991
  • 11
  • 123
  • 154