1. In my auth.conf file, I tell Jboss to use the DatabaseServerLoginModule for authentication. When I run my app however it uses the UserRolesLoginModule instead. My auth.conf file is at the end of this message.
2. How do I get Form based login to work? In my web.xml file I have everything I should have for it to work, however whenever it needs to login, a login window popups instead of being redirected to the login page. Also, if I go to the login page and try to submit the form, I get a "(404) <app context>/j_security_check" not found error.
// Put login modules providing authentication and realm mappings
// for security domains.
/* A JDBC based LoginModule
dsJndiName: The name of the DataSource of the database containing the Principals, Roles tables
principalsQuery: The prepared statement query equivalent to:
"select Password from Principals where PrincipalID=?"
rolesQuery: The prepared statement query equivalent to:
"select Role, RoleGroup from Roles where PrincipalID=?"
principalsQuery="select password from systemusers where userid=?"
rolesQuery="select r.id, r.description from role r, userroles ur where ur.userid=? and ur.roleid = r.id"
// Very simple login module:
// any user name is accepted.
// password should either coincide with user name or be null,
// all users have role "guest",
// users with non-null password also have role "user"
// Used by clients within the application server VM such as
// mbeans and servlets that access EJBs.