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!

Not going to LoginPage.jspx from the welcome page(Redirect loop error):

662340Aug 21 2009 — edited Oct 10 2012
I am using the jdeveloper 11.1.1.1.0
I created a simple ADF application.i run the ADF security wizard.
and i opted for form based authentication.here i gave cutom login, error pages path(like
/faces/loginpage.jspx, /faces/error.jspx)

i created the welcome page which is public page(i gave view permission to anonymous-role).
the welcome.jspx page code:


<af:form id="f1">


<af:image source="#{securityContext.authenticated? '/images/logout.jpg ' : '/images/login.gif'}"
id="pti2" inlineStyle="width:40px; height:40px;"
shortDesc="switchable icon"/>



<af:goLink text="#{securityContext.authenticated ?&quot; Click to log out&quot; :
&quot;Click to log in&quot;}" id="gl1"
destination="#{securityContext.authenticated ?
&quot;/adfAuthentication?logout=true&amp;end_url=/faces/welcome.jspx&quot; :
&quot;/adfAuthentication?success_url=/faces/welcome.jspx&quot;}"/>


</af:form>


Next i created the backingbean loginpagebean.java and created the login page using ADF components.
and i bind the login button action property to dologin() method in Backinbean.(i followed the steps given in 'Creating a Login Page' of 'Enabling ADF Security in a Fusion Web Application' chapter )


next my application has first.jspx web page .and is secured one.and assinged the view permission for a defined role.


In web.xml file, in security tab, for formbased Authentication i gave like below:

Loginpage: /faces/loginpage.jspx
error page: /faces/error.jspx



totaly my application is having,

Loginpage.jspx,
error.jspx,
welcome.jspx,
first.jspx.

the above pages.


when i run the welcome.jspx page and after clicking the login link i have to go to the login.jspx page.here the login.jspx is called by the container.

But i am not going to login.jspx page and getting the error "Redirect Loop --Too many redirects occurred trying to open “http://127.0.0.1:7101/adfSecAug19-ViewController-context-root/adfAuthentication”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page." in Browser.


IN Jdeveloper log i got:

[JpsAuth] Check Permission
PolicyContext: [adfSecAug19#V2.0]
Resource/T
This post has been answered by Frank Nimphius-Oracle on Aug 24 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2012
Added on Aug 21 2009
4 comments
1,643 views