问题描述
我想要实现的东西,如Facebook为在那里你进入页面,登录(与名和密码),并在通过身份验证后其他页面导航。但是,如果你未通过身份验证你看不到其他页面(您将被重定向到登录页面)。
什么是使用要做到这一点的最佳方法的Java EE?
I want to implement something like facebook as where you enter the page, login (with name and password) and navigate in the other pages once authenticated. But if you are not authenticated you cannot see the other pages (you are redirected to the login page).What's the best way to do this by using Java EE?
推荐答案
要举的:
在Sun Java System Application Server安全模型基于一个认证的用户会话。一旦会话已创建的应用程序用户进行身份验证(如果使用了身份验证),并登录到会话。从接收EJB请求的servlet的每次交互一步做了两件事:生成一个JSP内容格式化输出,并且检查用户是否正确验证
一个会话是指识别和服务器标记属于一起HTTP(S)请求。 Servlet可以识别属于一个已知会话的新要求,并能坚持沿着一个会话的请求的信息。使用这种只会返回正确的内容,如果它记住用户已在本届会议期间成功验证(如果该机制已被设置)。
A session means HTTP(S) requests which are identified and tagged by the server to belong together. The servlet can identify a new request belonging to a known session and can persist information along the requests of a session. Using this it will only return the proper content, if it has memorized that the user has successfully authenticated during that session (if that mechanism has been configured).
因此,了解会议(以上链接),然后继续进行身份验证的文档,例如看到。
Thus read about session (link above) and then continue with the documentation on authentication, e.g. see here.
这篇关于与Java EE认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!