PLZ help me out...
I have implemented an authentication code using JAAS.The login form is written as .JSP and have used MySQL as database.
The problem is when I run the code I get an error "No LoginModule found for jaas_configinfo" were "jaas_configinfo" is the module written in my configuration file which is as follows...
jaas_configinfo {
com.user.jaas_rdbms.authenticate.MyLoginModule Required debug="true" url= "jdbc:mysql://localhost:3306/userinfo?user=root&password=mrunmai" driver="com.mysql.jdbc.Driver";
};
and my
JSP page is accepting the username and password from user and the related code is as follows...
try {
// Get the form's username & password fields
//
LoginContext lc= null;
String user = request.getParameter("username_text");
String pass = request.getParameter("password_text");
// Using the username/password to initialize the
// callback handler and then do the authentication.
//
MyCallbackhandler mcbh= new MyCallbackhandler(user,pass);
lc = new LoginContext("jaas_configinfo", mcbh);
lc.login();
.
.
.
when it comes to the line "lc=new LoginContext("jaas_congiginfo",mcbh);"
the exception "No LoginModule found for ur jaas_configinfo!" is generated..
I am using WSAD as the app. server and passing
"-Djava.security.auth.login.config=jaas_rdbms.config" as
Java VM arguments in the Environment Options of the Web-Server.
Don't understand whats wrong with that..
Plz help me out..
Thanks in advance ,
Mrunmai