文章详情页
JSF中用户登出返回登录页面问题
在页面中使用
<h:commandLink value="[#{msg.logout}]" action="#myBean.logout}"></h:commandLink>
做登出操作的时候,代码如下:
public String logoutHMS() {
String outCome ="logoutSuccess";
System.out.print("Logout!!);
// 设置登录Session关键信息
FacesContext fc = FacesContext.getCurrentInstance();
HttpSession Session = (HttpSession) fc.getExternalContext()
.getSession(false);
Session.invalidate();
return outCome;
}
不能使用actionListener属性,否则退出了,重载不了登录页面。
标签:
JavaScript
相关文章:
1. RichFaces 2.0 -- 建立在AJAX4JSF之上的组件库 - 发布了2. ajax4jsf 1.0.2 发布,添加新的a4j tags.3. Ajax4JSF 子项目 G4jsf 发布4. JSF开发利器FaceletsTools 1.0 for Dreamweaver 发布5. ajax4jsf 1.0.3 发布, 引入新的功能6. Sun’s JSF implementation released7. Ajax4jsf 1.0 发布8. JSF Library QuipuKit 1.0 发布9. 开源 Ajax JSF Library - RCFaces 发布10. JSFToolbox 1.0 发布--用Dreamweaver开发JSF
排行榜