0

我正在使用 JSF 开发一个 java web 应用程序,我想知道我是否可以在不同的位置保存(和保存)用户信息,比如一个文件,然后当用户在日期之前确认他们的电子邮件时保存到数据库中。

我还不明白某些事情。我想知道的是是否可以对这个问题使用序列化。

4

2 回答 2

1

在用户确认其电子邮件之前,您需要将用户持久保存在数据库中。您需要为他设置一个状态 NOT_CONFIRMED,它可以转换为 CONFIRMED。

在他确认之前,您不应允许已找到但具有 NOT_CONFIRMED 等非法状态的用户的应用程序登录。

对于大多数用例,将用户数据保存在其他地方没有任何好处。

于 2013-07-19T22:55:40.617 回答
0

HTML5 proposes the local storage API which permits storing data in the browser of your client. Since the user is not logged, you'll be unable to recognize him from another computer, so it's fair that the data will be available only on the browser he wrote it in.

You can then transfer the data to your server once the user is connected (htis feature is used by Google documents, offline gmail etc...). If you're using GWT, a java API is available to access the native browser API, otherwise, you'll need some js coding

Best Regards, Zied Hamdi http://1vu.fr

于 2013-07-19T23:59:34.480 回答