Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to store config parameters in GWT?

Where I can store configuration parameters in client side? I haven't possibility to store parameters in Servlet init parameters(web.xml) (because I must use PHP). So how I can store init application parameters (for example PHP script location, some passwords etc.) on client side?

like image 844
WelcomeTo Avatar asked Jan 21 '12 16:01

WelcomeTo


1 Answers

To do this you have a following options:

  1. Store data in client side code. GWT compiles down to the javascript and the simplest way to do this is to create a Configuration class with hardcoded values.
  2. Store data in a browser. You can use cookies or HTML5 local storage
  3. Store data on a server side and retrieve them using remote RPC.

I would recommend you go with third option.

like image 135
Mairbek Khadikov Avatar answered Sep 27 '22 17:09

Mairbek Khadikov