在 GWT 中存储配置参数的位置? [英] Where to store config parameters in GWT?
本文介绍了在 GWT 中存储配置参数的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
客户端在哪里可以存储配置参数?我无法在 Servlet init parameters(web.xml) 中存储参数(因为我必须使用 PHP).那么如何在客户端存储 init 应用程序参数(例如 PHP 脚本位置、一些密码等)?
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?
推荐答案
为此,您有以下选择:
- 在客户端代码中存储数据.GWT 编译为 javascript,最简单的方法是创建一个带有硬编码值的
Configuration
类. - 在浏览器中存储数据.您可以使用 cookie 或 HTML5 本地存储
- 在服务器端存储数据并使用远程 RPC 检索它们.
我建议您选择第三种选择.
I would recommend you go with third option.
这篇关于在 GWT 中存储配置参数的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文