I have some very basic questions relating to j_security_check in FORM based authentication.
For this eg:
<form method="POST" action="j_security_check">
<table border="0" cellspacing="5">
<tr>
<th align="right">Username:</th>
<td align="left"><input type="text" name="j_username"></td>
</tr>
<tr>
<th align="right">Password:</th>
<td align="left"><input type="password" name="j_password"></td>
</tr>
<tr>
<td align="right"><input type="submit" value="Log In"></td>
<td align="left"><input type="reset"></td>
</tr>
</table>
</form>
Once the information is entered,it is supposed to use j_security_check to verify the information entered but where is the authentication being performed(how does the validation work) and what exactly does action=j_security_check do(does this action invoke some file?).
One more thing,I don't understand how the role names are mapped to the actual user names.I'm following the example on the site:
http://radio.weblogs.com/0132383/stories/2004/04/23/usingFormBasedAuthentication.html Or for that matter in any case of form based authentication,are the roles defined in the web.xml file?If yes,then where are the users of this role defined?And again,how is the information that I enter verified against the information in the database.
One last thing,when I was executing the example mentioned on the earlier website,the system gave me the following 500
servlet exception.Any idea what this means?
javax.servlet.ServletException: No forwarding URI for form authentication.Either the login form must specify j_uri or the session must have a saved URI. [ November 18, 2004: Message edited by: aston endreasa ]