在jsf中启动会话的基本步骤 [英] Basic steps for starting session in jsf
问题描述
任何人都可以告诉我在jsf中创建新会话所必须执行的基本步骤吗?
Can anyone please tell me the basic steps which are must to perform for creating new session in jsf?
会话范围的托管Bean是否将真实用户重定向到某个页面创建会话?
Does a session scoped managed bean redirecting authentic user to some page create session?
推荐答案
有人可以告诉我在jsf中创建新会话所必须执行的基本步骤吗?
您无需对HTTP会话进行任何操作.每当应用程序需要时(例如,当您在JSF中使用会话范围的托管bean时),servletcontainer都会为您创建和管理它.
You don't need to do anything with regard to the HTTP session. The servletcontainer will create and manage it for you whenever the application requires so (e.g. whenever you're using a session scoped managed bean in JSF).
会话范围的托管Bean是否将真实用户重定向到某个页面创建会话?
JSF不提供内置功能来处理身份验证.有几种选择:
JSF doesn't offer builtin facilities to handle authentication. There are several options:
-
自行自行种植.登录时,将登录的
User
设置为会话范围的受管bean的属性,并让您的应用程序在其上进行拦截.
Homegrow it yourself. On login set the logged-in
User
as a property of a session scoped managed bean and let your application intercept on that.
- JSF HTTP Session Login
- How can I create a new session with a new User login on the application?
- What is the correct way to implement login with redirect using JSF 2.0?
结合使用Servlet API提供的容器管理的身份验证和包装管理的bean.
Use the Servlet API provided container managed authentication in combination with a wrapper managed bean.
- 在Java中执行用户身份验证使用j_security_check 的EE/JSF
- Performing user authentication in Java EE / JSF using j_security_check
这篇关于在jsf中启动会话的基本步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!