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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ADF Security Logout Issues

Mr OracleJan 10 2012 — edited Jan 14 2012
JDev 11.1.1.5 - Windows 7 x64 - WLS 10.3.5(internal)

I have implemented ADF Security in my application - and everything seems to work OK.
When I logout, however it is a different story - I cannot log in again without exiting the browser.

To test this I have a simple design - two pages - a welcome.jspx (no backing bean) and a menu.jspx. there is a link (login) going from the welcome page to the menu page.
In the welcome I have a simple image, static text and a command button the has the action set to login.
(both have pageDefs) - the welcome is set to anon. - and the menu has a ROLE assigned - as I say this all seems to work.

The menu page is secured with a role and has a navigation link (in a template) that calls the logout from a backing bean.
The menu is based on a template form that contains the logout, username and such.

when I log in it works correctly and navigates to the menu page.
When I log out :

public String doLogout() {
FacesContext facesCtx = FacesContext.getCurrentInstance();
ExternalContext eCtx = facesCtx.getExternalContext();
String url = eCtx.getRequestContextPath() + "/adfAuthentication?logout=true&end_url=/faces/welcome.jspx";
try {
eCtx.redirect(url);
} catch (IOException e) {
e.printStackTrace();
}
facesCtx.responseComplete();
return null;
}

it return to the welcome page - but the button for the login no longer works.
I have noticed it is also restoring the previous state. How can I force a reload of the welcome page?

With the hundreds of solutions and example out there (all a little different) it is very, very confusing.
I am using form based and have allowed the JDev to create the pages (html).

Eventually I will have to get rid of the garbage html - it looks terrible - and replace it with a popup (cannot use the browser 'basic') the login looks like a 2 year old did it.
This is also terrifying - I have seen sooo many variation on the login code - tried a few (none of which worked) - a lot have depreciated calls.

I have spent days going through the examples (most of which I suspect were for older version of the wls and jdev) - they are never annotated as to the version.
Even since 11.1.1.4 there have been changes.

Has anyone managed to get the login/logout using jspxs to work? and if so how?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 11 2012
Added on Jan 10 2012
7 comments
673 views