如何在每次刷新浏览器时收到提醒消息

发布于 2024-10-09 18:40:03 字数 137 浏览 5 评论 0原文

我有一个在flex中完成的登录系统。一旦用户登录,如果他刷新页面,它将带您返回登录页面。我怎样才能使登录的用户仅使用flex和java留在同一页面?另外,如果一旦用户登录,另一个用户使用相同的用户名和密码登录,我如何使用flex和java处理数据?请帮我 谢谢

i have a login system done in flex.once the user logs in and if he refreshes the page it will take you back to the login page.how can i make the logged in user stay in the same page using flex and java only?and also if once user is logged in and another loggs in with the same user name and passwrod how can i handle dat using flex and java? please help me
thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

莳間冲淡了誓言ζ 2024-10-16 18:40:03

您需要研究深层链接。它允许您通过在 URL 中的井号后面传递值来将用户带到应用程序中的特定状态。

例如,http://example.com/app.html#post=1 可以导航应用程序并向用户显示应用程序的状态,就像用户自己导航到第一篇文章一样。

这种方法利用了这样一个事实:网络浏览器不会重新加载随后再次请求的带有井号的 URL 的页面/应用程序。因此,使用 Flash,应用程序将不会重新加载。

You are going to want to look into deep linking. It allows you to bring the user to a specific state in the application by passing in values after the the pound sign in a URL.

For example, http://example.com/app.html#post=1 could navigate the application and show the user the state of the application as if the user had navigated to the first post themselves.

This approach takes advantage of the fact that web browsers do not reload the page/app for URLs that are subsequently requested again with the pound sign in them. So, with Flash, the application wont be reloaded.

扛起拖把扫天下 2024-10-16 18:40:03

我假设您的 Flex 应用程序向 Java 后端发送请求,包括登录请求。

更简单的方法是将登录页面实现为 JSP 或其他一些 Java 技术。可以配置该站点,以便访问托管 Flex 应用程序的页面需要用户登录。

如果您想通过 Flex 登录,您可以在用户登录后设置一个身份验证令牌 cookie,然后检查查看 cookie 是否已设置。您还必须确保您的客户端处理授权可能已过期的情况并再次显示登录屏幕。

I assume your Flex application sends requests to your Java back end, including login requests.

The easier approach would be to implement your login page as JSP or some other Java technology. The site could be configured such that accessing the page hosting the Flex application requires that the user is logged in.

If you want to do the login through Flex, you could set an auth token cookie once the user has logged in, and then check to see if the cookie has already been set. You'd also have to make sure your client handles the case where the authorization may have expired and show the login screen again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文