Sunday, March 6, 2011

Steps to create Login Page in ADF11g

I was following Andrejus's blog to create a login page in ADF 11g. and i successfully created it in Jdev11.1.1.3.
but the issue came when i tried to create the Login Page in Jdev11.1.1.4.
In this blog i will explain the issue i faced while creating Login page in Jdev11.1.1.4 and how to solve that issue.

when we will follow the steps of Jdev11.1.1.3 then on running the Application the login.jspx page will never come up and there will be no error on the Log files. we will end up with a screen like:



Though everything seems to be fine and same as that of Jdev11.1.1.3 there is one improvement made in Jdev11.1.1.4.
As explained in Andrejus's blog that in Jdev11.1.1.3 we need to explicitly grant anonymous-role permission to the login page.
In Jdev11.1.1.4 whenever a login page is created it is automatically granted the anonymous-role permission.
so when we open the jazan-data.xml and go to Resource Grants tab we will see that it is automatically  granted

but actually when we open the jadan-data.xml file and click on the "+" sign on Granted To Role column for login page we will see that we are still getting anonymous-role option

so in the jazan-data.xml it is appearing that it already has public permission but for Add Grantee it is still giving option to add anonymous-role.
so this was causing the problem.
for me it seems as in Jdev11.1.1.3 Login page was not public by default, so in Jdev11.1.1.1.4 it has been made public by default. but in the backend it is still not updated for our application.

so to solve this issue after configuring the ADF Security go to the source of jazan-data.xml and delete all the code from there.
come back to the overview tab of jadan-data.xml.
now you will see that the automatic grant to anonymous-role for Login page has dissapered and on clicking the "+" sign we are getting only 1 option of anonymous-role.

Now follow the same steps to add Application roles and grant Resources.
now when you will run the code you will get the Login screen.:)











No comments:

Post a Comment