ADF中清空Session信息的代码示例

来源:互联网 发布:系统数据安全解决方案 编辑:程序博客网 时间:2024/06/05 07:33

代码源于Fusion Developer Guide for ADF,可以整理成框架的公用代码:

public String logoutButton_action() throws IOException{ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();HttpServletResponse response = (HttpServletResponse)ectx.getResponse();HttpSession session = (HttpSession)ectx.getSession(false);session.invalidate();response.sendRedirect("Welcome.jspx");return null;)

总结:很多功能代码都可以在Guide中找到,多查找并使用Best practice的内容。


原创粉丝点击