For some reason one common request we see on OTN, especially from people who just start their JDev/ADF route from Oracle Forms background, is to create a login screen that uses a database table with username/password to validate users.
It might be that this is the way people managed users in their Forms application.
Now in reality this is not the way they'll probably end up doing authentication in their ADF application - after all ADF and Java EE has a complete security framework for this.
But never the less many people want to try it that way.
So I quickly created a simple sample using basic JSF page flow a login page and a login button on it that just uses JDBC to query for the existence of a username in the employees table.
You can download the sample from here
zipped workspace
Check out the GetUser.java file for the code I use and modify your DB connection and query as needed and then run the getUser.jspx file.
Enjoy.
Comments (4)
Hi Shay;
How to mange our huge users if not using DBTable?
I want using ADF Security without DBTable but how can i mange my application users like
Show all, create, edit, delete, change privligis etc at application runtime?
i use DB to esay do
buti dont know how to do that using ADF Security only withoutDB) at runtime?
please help
Big Thank to you
Posted by Jdeveloper | November 17, 2008 2:49 AM
Posted on November 17, 2008 02:49
Hi shay,
You said "especially from people who just start their JDev/ADF route from Oracle Forms background, is to create a login screen that uses a database table with username/password to validate users"
I am also a forms person, but what is the ADF way of user varification and role checking..Thanks, L
Posted by Lalitha Ketineni | December 12, 2008 1:02 PM
Posted on December 12, 2008 13:02
ADF has a complete security framework which relies on Java EE authentication.
Frank does a good job showing how it works in his code corner in a set of online demos:
http://www.oracle.com/technology/products/jdev/tips/fnimphius/index.html
Posted by Shay | December 12, 2008 1:10 PM
Posted on December 12, 2008 13:10
Hello Shay !
I am new to ADF and have been struggling for making a login application for a while.
In my application there is also a model project so I assume I had better query the database in an application module under the Model projet rather than from the backing bean.
Do you have a demo where you perform it. I could not figure out how to call the aplication module method from the backing bean and make the necessary bindings.
Thanks in advance.
Posted by Gorkem Turan | August 19, 2009 12:36 AM
Posted on August 19, 2009 00:36