I have two questions about DatabaseServerLoginModule :
1. After successfully authenticated by using DatabaseServerLoginModule, How can I get the current authenticated user in my web application (or servlet),just like LoginContext.getSubject()?
2. about principalsQuery: The prepared statement query must equivalent to: ?select Password from Principals where PrincipalID=??. Can I specify more information, just like ?select Password,username,DriverCardId from Principals where PrincipalID=??
My logon.jsp just as the following:
<%@ include file="/template/banner.jsp" %>
<h3><fmt:message key="Logon"/> <fmt:message key="Submit"/>.</h3>
<form action="j_security_check" method=post>
<input type="submit" value="<fmt:message key="Submit"/>">
2.)AFAIK, as long as your query returns the password in the first column, and only accepts one paramter (the username), you are good to go.
I am not sure why you posted your login form.