Hi,
I am recently doing working with JAAS using JSF and server is JBOSS 4.0.
I have made and application but some problem occur..
I made MainLogin.jsp that request username and password from user, it has backing file with name MainLogin.java in which method just like:

public String checkValidUser(){
System.out.println("In Main Login Bean......................");
javaService=new JavaServiceFacade();
try{
ej = (Login)javaService.checkAuthenticatedUser(loginnam e,password);
}catch(Exception e){
System.out.println("Error calling checkAuthenticatedUser: "+e.getMessage());
e.printStackTrace();
}
if(ej != null)
{
System.out.println("good");
return "success";
}
else
System.out.println("fail");
return "fail";
}
this method send username and password to javafacade in which service Locator will look up to LoginSessionBean. In LoginSessionBean validation is made by running the qurey from database(MySQL):

Query qry = em.createQuery("Select o from Login o where o.username = ?1 and o.password = ?2");
qry.setParameter(1, name);
qry.setParameter(2,pasword);
Above all procedure done validation Successfully:

Now I want to implement JAAS with this application. Please Can any body help me or can Explain how it will done thanks.. please reply soon