Where to store config parameters in GWT?

前端 未结 5 1087
伪装坚强ぢ
伪装坚强ぢ 2021-01-12 09:30

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

5条回答
  •  心在旅途
    2021-01-12 09:48

    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.

提交回复
热议问题