Where to store config parameters in GWT?

前端 未结 5 1124
伪装坚强ぢ
伪装坚强ぢ 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:59

    Standard, simple and easy way to store non-constant parametres(such as passwords, or any user data) on client side is cookies. See Cookies

    Constant parameters you can store in hardcode(static fields in some class) or in resoures .properties files(See GWT i18n constants interface).

    PS: I will not recomment you to store password on client side "as is"(it is not safe), instead you can store password hash(md5, for example). Just calculate password hash on server side and store this hash in cookies.

提交回复
热议问题