Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can't logout in ADF ?

Zeroxin-OracleDec 16 2010 — edited Dec 23 2010
Hi,

I used JDev.11.1.1.2

I have a logout button on main page, and the action property of the button refers to a method in managed bean, like the following code:

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

But when I click the log out button, it reports error "<QueryRenderer><renderTools> A null QueryModel object was found" and still on the current page.

I search the forum and found that "The ADF pageFlowScope is stored in the session, which means that removing the session removes all the memory the taskflows has.", it really works when remove "session.invalidate()".

but the code is the same with sample code in Section 40.6.2 in <Fusion Developer's Guide for Oracle ADF.pdf> , and Page 263 in <oracle_fusion_developer_guide.pdf>, so I think it should be OK using "session.invalidate()".


thanks,
zeroxin
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 20 2011
Added on Dec 16 2010
10 comments
1,710 views